Merge pull request #2826 from vector-im/feature/bma/fix_crash

Fix crash reported by PlayStore (#2707)
This commit is contained in:
Benoit Marty 2021-02-16 13:10:21 +01:00 committed by GitHub
commit 9501fd74f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 3 deletions

View File

@ -13,6 +13,7 @@ Improvements 🙌:
Bugfix 🐛:
- VoIP : fix audio devices output
- Fix crash after initial sync on Dendrite
- Fix crash reported by PlayStore (#2707)
Translations 🗣:
-

View File

@ -52,6 +52,7 @@ import androidx.core.view.ViewCompat
import androidx.core.view.forEach
import androidx.core.view.isInvisible
import androidx.core.view.isVisible
import androidx.lifecycle.lifecycleScope
import androidx.recyclerview.widget.ItemTouchHelper
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
@ -1043,7 +1044,7 @@ class RoomDetailFragment @Inject constructor(
}
private fun updateJumpToReadMarkerViewVisibility() {
views.jumpToReadMarkerView.post {
viewLifecycleOwner.lifecycleScope.launchWhenResumed {
withState(roomDetailViewModel) {
val showJumpToUnreadBanner = when (it.unreadState) {
UnreadState.Unknown,

View File

@ -29,6 +29,7 @@ import androidx.core.view.ViewCompat
import androidx.core.view.isInvisible
import androidx.core.view.isVisible
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.lifecycleScope
import androidx.transition.Transition
import im.vector.app.R
import im.vector.app.core.di.ActiveSessionHolder
@ -131,7 +132,7 @@ class VectorAttachmentViewerActivity : AttachmentViewerActivity(), BaseAttachmen
if (savedInstanceState == null) {
pager2.setCurrentItem(initialIndex, false)
// The page change listener is not notified of the change...
pager2.post {
lifecycleScope.launchWhenResumed {
onSelectedPositionChanged(initialIndex)
}
}

View File

@ -25,6 +25,7 @@ import android.view.ViewGroup
import android.widget.ScrollView
import androidx.core.view.forEach
import androidx.core.view.isVisible
import androidx.lifecycle.lifecycleScope
import com.airbnb.mvrx.activityViewModel
import com.airbnb.mvrx.args
import com.airbnb.mvrx.fragmentViewModel
@ -171,7 +172,7 @@ class UserListFragment @Inject constructor(
// Scroll to the bottom when adding chips. When removing chips, do not scroll
if (newNumberOfChips >= currentNumberOfChips) {
views.chipGroupScrollView.post {
viewLifecycleOwner.lifecycleScope.launchWhenResumed {
views.chipGroupScrollView.fullScroll(ScrollView.FOCUS_DOWN)
}
}