Fix minor issues

This commit is contained in:
Phillip Thelen 2020-09-21 16:40:57 +02:00
parent 499fca1d34
commit c28ef23760
8 changed files with 27 additions and 20 deletions

View file

@ -158,7 +158,7 @@ android {
multiDexEnabled true
resConfigs "en", "bg", "de", "en-rGB", "es", "fr", "hr-rHR", "in", "it", "iw", "ja", "ko", "lt", "nl", "pl", "pt-rBR", "pt-rPT", "ru", "tr", "zh", "zh-rTW"
versionCode 2554
versionCode 2557
versionName "3.0"
}

View file

@ -48,6 +48,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/Overline"
android:textColor="@color/white"
android:textAllCaps="true"
android:layout_marginBottom="4dp"
/>

View file

@ -31,7 +31,8 @@
android:maxLines="3"
android:ellipsize="end"
android:textSize="12sp"
tools:text="Notes"/>
tools:text="Notes"
android:layout_marginBottom="7dp"/>
<Button
android:id="@+id/expand_notes_button"
@ -50,9 +51,6 @@
android:text="@string/pending_approval"
android:textColor="@color/text_quad"
/>
<Space
android:layout_width="wrap_content"
android:layout_height="7dp" />
<LinearLayout
android:id="@+id/taskIconWrapper"
android:layout_width="match_parent"
@ -88,6 +86,7 @@
android:layout_marginEnd="2dp"
app:tint="@color/text_ternary"
android:alpha="0.25"
android:visibility="gone"
app:tintMode="multiply"/>
<TextView
android:id="@+id/streakTextView"

View file

@ -96,7 +96,7 @@
<dimen name="currency_icon_size">24dp</dimen>
<dimen name="shopitem_dialog_content_inset">24dp</dimen>
<dimen name="reward_width">84dp</dimen>
<dimen name="task_min_height">50dp</dimen>
<dimen name="task_min_height">60dp</dimen>
<!-- Per the design guidelines, navigation drawers should be between 240dp and 320dp:
https://developer.android.com/design/patterns/navigation-drawer.html -->

View file

@ -44,6 +44,7 @@ import com.habitrpg.android.habitica.databinding.ActivityLoginBinding
import com.habitrpg.android.habitica.extensions.addCancelButton
import com.habitrpg.android.habitica.extensions.addCloseButton
import com.habitrpg.android.habitica.extensions.addOkButton
import com.habitrpg.android.habitica.extensions.updateStatusBarColor
import com.habitrpg.android.habitica.helpers.*
import com.habitrpg.android.habitica.models.auth.UserAuthResponse
import com.habitrpg.android.habitica.proxy.CrashlyticsProxy
@ -186,6 +187,11 @@ class LoginActivity : BaseActivity(), Consumer<UserAuthResponse> {
}
}
override fun loadTheme(sharedPreferences: SharedPreferences, forced: Boolean) {
super.loadTheme(sharedPreferences, forced)
window.updateStatusBarColor(R.color.black_20_alpha, false)
}
private fun setupFacebookLogin() {
callbackManager = CallbackManager.Factory.create()
loginManager.registerCallback(callbackManager,

View file

@ -269,17 +269,6 @@ class NavigationDrawerFragment : DialogFragment() {
subscriptionItem?.pillText = context?.getString(R.string.sale)
context?.let { subscriptionItem?.pillBackground = ContextCompat.getDrawable(it, R.drawable.pill_bg_teal) }
}
if (activePromo != null) {
var promotedItem: HabiticaDrawerItem? = null
if (activePromo?.promoType == PromoType.GEMS_AMOUNT || activePromo?.promoType == PromoType.GEMS_PRICE) {
promotedItem = getItemWithIdentifier(SIDEBAR_GEMS)
}
if (activePromo?.promoType == PromoType.SUBSCRIPTION) {
promotedItem = getItemWithIdentifier(SIDEBAR_GEMS)
}
promotedItem?.pillText = context?.getString(R.string.sale)
promotedItem?.pillBackground = context?.let { activePromo?.pillBackgroundDrawable(it) }
}
subscriptionItem?.let { updateItem(it) }
val promoItem = getItemWithIdentifier(SIDEBAR_SUBSCRIPTION_PROMO)
@ -512,9 +501,21 @@ class NavigationDrawerFragment : DialogFragment() {
if (activePromo != null) {
promoItem.isVisible = true
adapter.activePromo = activePromo
var promotedItem: HabiticaDrawerItem? = null
if (activePromo?.promoType == PromoType.GEMS_AMOUNT || activePromo?.promoType == PromoType.GEMS_PRICE) {
promotedItem = getItemWithIdentifier(SIDEBAR_GEMS)
}
if (activePromo?.promoType == PromoType.SUBSCRIPTION) {
promotedItem = getItemWithIdentifier(SIDEBAR_SUBSCRIPTION)
}
promotedItem?.pillText = context?.getString(R.string.sale)
promotedItem?.pillBackground = context?.let { activePromo?.pillBackgroundDrawable(it) }
promotedItem?.let { updateItem(it) }
} else {
promoItem.isVisible = false
}
updateItem(promoItem)
}
companion object {

View file

@ -108,7 +108,7 @@ abstract class BaseTaskViewHolder constructor(itemView: View, var scoreTaskFunc:
notesTextView?.maxLines = 100
expandNotesButton?.text = context.getString(R.string.collapse_notes)
} else {
notesTextView?.maxLines = 5
notesTextView?.maxLines = 8
expandNotesButton?.text = context.getString(R.string.expand_notes)
}
}
@ -120,7 +120,7 @@ abstract class BaseTaskViewHolder constructor(itemView: View, var scoreTaskFunc:
expandNotesButton?.visibility = View.GONE
notesExpanded = false
notesTextView?.maxLines = 5
notesTextView?.maxLines = 8
if (data.notes?.isNotEmpty() == true) {
notesTextView?.visibility = View.VISIBLE
notesTextView?.setTextColor(ContextCompat.getColor(context, R.color.text_ternary))

View file

@ -11,7 +11,7 @@
"type": "SINGLE",
"filters": [],
"properties": [],
"versionCode": 2554,
"versionCode": 2557,
"versionName": "3.0",
"enabled": true,
"outputFile": "Habitica-staff-release.apk"