mirror of
https://github.com/element-hq/element-android
synced 2024-11-27 11:59:12 +03:00
Do not show long click help if only invitation are displayed
This commit is contained in:
parent
2e87e0b4c1
commit
bba58d25e1
2 changed files with 8 additions and 5 deletions
|
@ -11,7 +11,7 @@ Other changes:
|
||||||
-
|
-
|
||||||
|
|
||||||
Bugfix 🐛:
|
Bugfix 🐛:
|
||||||
-
|
- Do not show long click help if only invitation are displayed
|
||||||
|
|
||||||
Translations 🗣:
|
Translations 🗣:
|
||||||
-
|
-
|
||||||
|
|
|
@ -24,8 +24,8 @@ import im.vector.riotx.R
|
||||||
import im.vector.riotx.core.epoxy.helpFooterItem
|
import im.vector.riotx.core.epoxy.helpFooterItem
|
||||||
import im.vector.riotx.core.epoxy.noResultItem
|
import im.vector.riotx.core.epoxy.noResultItem
|
||||||
import im.vector.riotx.core.resources.StringProvider
|
import im.vector.riotx.core.resources.StringProvider
|
||||||
import im.vector.riotx.features.home.RoomListDisplayMode
|
|
||||||
import im.vector.riotx.core.resources.UserPreferencesProvider
|
import im.vector.riotx.core.resources.UserPreferencesProvider
|
||||||
|
import im.vector.riotx.features.home.RoomListDisplayMode
|
||||||
import im.vector.riotx.features.home.room.filtered.FilteredRoomFooterItem
|
import im.vector.riotx.features.home.room.filtered.FilteredRoomFooterItem
|
||||||
import im.vector.riotx.features.home.room.filtered.filteredRoomFooterItem
|
import im.vector.riotx.features.home.room.filtered.filteredRoomFooterItem
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
@ -63,7 +63,7 @@ class RoomSummaryController @Inject constructor(private val stringProvider: Stri
|
||||||
RoomListDisplayMode.SHARE -> {
|
RoomListDisplayMode.SHARE -> {
|
||||||
buildFilteredRooms(nonNullViewState)
|
buildFilteredRooms(nonNullViewState)
|
||||||
}
|
}
|
||||||
else -> {
|
else -> {
|
||||||
var showHelp = false
|
var showHelp = false
|
||||||
val roomSummaries = nonNullViewState.asyncFilteredRooms()
|
val roomSummaries = nonNullViewState.asyncFilteredRooms()
|
||||||
roomSummaries?.forEach { (category, summaries) ->
|
roomSummaries?.forEach { (category, summaries) ->
|
||||||
|
@ -80,7 +80,10 @@ class RoomSummaryController @Inject constructor(private val stringProvider: Stri
|
||||||
nonNullViewState.joiningErrorRoomsIds,
|
nonNullViewState.joiningErrorRoomsIds,
|
||||||
nonNullViewState.rejectingRoomsIds,
|
nonNullViewState.rejectingRoomsIds,
|
||||||
nonNullViewState.rejectingErrorRoomsIds)
|
nonNullViewState.rejectingErrorRoomsIds)
|
||||||
showHelp = userPreferencesProvider.shouldShowLongClickOnRoomHelp()
|
// Never set showHelp to true for invitation
|
||||||
|
if (category != RoomCategory.INVITE) {
|
||||||
|
showHelp = userPreferencesProvider.shouldShowLongClickOnRoomHelp()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -108,7 +111,7 @@ class RoomSummaryController @Inject constructor(private val stringProvider: Stri
|
||||||
|
|
||||||
when {
|
when {
|
||||||
viewState.displayMode == RoomListDisplayMode.FILTERED -> addFilterFooter(viewState)
|
viewState.displayMode == RoomListDisplayMode.FILTERED -> addFilterFooter(viewState)
|
||||||
filteredSummaries.isEmpty() -> addEmptyFooter()
|
filteredSummaries.isEmpty() -> addEmptyFooter()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue