Fix send message button on profile

This commit is contained in:
Phillip Thelen 2020-11-16 13:56:15 +01:00
parent c3432a948c
commit 7a104c0c1f
4 changed files with 13 additions and 4 deletions

View file

@ -20,7 +20,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
android:theme="@style/Toolbar"
android:theme="@style/Toolbar.Modern"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.AppCompat.Dark"/>

View file

@ -16,7 +16,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
android:theme="@style/Toolbar"
android:theme="@style/Toolbar.Modern"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.AppCompat.Dark"/>

View file

@ -44,9 +44,14 @@ import com.habitrpg.android.habitica.ui.views.HabiticaSnackbar.SnackbarDisplayTy
import com.habitrpg.android.habitica.ui.views.dialogs.HabiticaAlertDialog
import io.reactivex.rxjava3.core.Flowable
import io.realm.RealmResults
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import java.text.SimpleDateFormat
import java.util.*
import javax.inject.Inject
import kotlin.coroutines.CoroutineContext
import kotlin.math.floor
import kotlin.math.min
@ -182,7 +187,11 @@ class FullProfileActivity : BaseActivity() {
}
private fun showSendMessageToUserDialog() {
MainNavigationController.navigate(R.id.inboxFragment, bundleOf(Pair("username", username), Pair("userID", userID)))
finish()
GlobalScope.launch(context = Dispatchers.Main) {
delay(1000L)
MainNavigationController.navigate(R.id.inboxMessageListFragment, bundleOf(Pair("username", username), Pair("userID", userID)))
}
}
private fun updateView(user: Member) {

View file

@ -134,7 +134,7 @@ class YesterdailyDialog private constructor(context: Context, private val userRe
val completed = !task.isDisplayedActive
val checkmark = taskView.findViewById<View>(R.id.checkmark)
val checkboxHolder = taskView.findViewById<View>(R.id.checkBoxHolder)
var checkboxBackground = taskView.findViewById<View>(R.id.checkbox_background)
val checkboxBackground = taskView.findViewById<View>(R.id.checkbox_background)
checkmark?.visibility = if (completed) View.VISIBLE else View.GONE
if (completed) {
checkboxHolder.setBackgroundResource(R.color.window_background)