mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-03 12:37:31 +01:00
cleaning
review fix string warning
This commit is contained in:
parent
b408d7346f
commit
b9e2374a4c
@ -46,17 +46,17 @@ data class ActiveSpaceViewState(
|
||||
class PromoteRestrictedViewModel @AssistedInject constructor(
|
||||
@Assisted initialState: ActiveSpaceViewState,
|
||||
private val activeSessionHolder: ActiveSessionHolder,
|
||||
private val appStateHandler: AppStateHandler
|
||||
appStateHandler: AppStateHandler
|
||||
) : VectorViewModel<ActiveSpaceViewState, EmptyAction, EmptyViewEvents>(initialState) {
|
||||
|
||||
init {
|
||||
appStateHandler.selectedRoomGroupingObservable.distinctUntilChanged().execute {
|
||||
val groupingMethod = it.invoke()?.orNull()
|
||||
appStateHandler.selectedRoomGroupingObservable.distinctUntilChanged().execute { state ->
|
||||
val groupingMethod = state.invoke()?.orNull()
|
||||
val isSpaceMode = groupingMethod is RoomGroupingMethod.BySpace
|
||||
val currentSpace = (groupingMethod as? RoomGroupingMethod.BySpace)?.spaceSummary
|
||||
val canManage = currentSpace?.roomId?.let { roomId ->
|
||||
activeSessionHolder.getSafeActiveSession()
|
||||
?.getRoom(currentSpace.roomId)
|
||||
?.getRoom(roomId)
|
||||
?.getStateEvent(EventType.STATE_ROOM_POWER_LEVELS, QueryStringValue.NoCondition)
|
||||
?.content?.toModel<PowerLevelsContent>()?.let {
|
||||
PowerLevelsHelper(it).isUserAllowedToSend(activeSessionHolder.getActiveSession().myUserId, true, EventType.STATE_SPACE_CHILD)
|
||||
|
@ -72,7 +72,7 @@ class MigrateRoomBottomSheet :
|
||||
|
||||
if (state.migrationReason == MigrationReason.MANUAL) {
|
||||
views.descriptionText.text = getString(R.string.upgrade_room_warning)
|
||||
views.upgradeFromTo.text = getString(R.string.upgrade_public_room_from_to, state.currentVersion, state.newVersion)
|
||||
views.upgradeFromTo.text = getString(R.string.upgrade_public_room_from_to_version, state.currentVersion, state.newVersion)
|
||||
} else if (state.migrationReason == MigrationReason.FOR_RESTRICTED) {
|
||||
views.descriptionText.setTextOrHide(state.customDescription)
|
||||
views.upgradeFromTo.text = getString(R.string.upgrade_room_for_restricted_note)
|
||||
|
@ -66,7 +66,6 @@ class RestrictedPromoBottomSheet : VectorBaseBottomSheetDialogFragment<BottomShe
|
||||
views.imageHint.isVisible = false
|
||||
views.bottomDescription.isVisible = false
|
||||
views.skipButton.isVisible = true
|
||||
views.learnMore.isVisible = true
|
||||
views.learnMore.text = getString(R.string.learn_more)
|
||||
}
|
||||
}
|
||||
|
@ -3505,6 +3505,7 @@
|
||||
<string name="upgrade_private_room">Upgrade private room</string>
|
||||
<string name="upgrade_room_warning">Upgrading a room is an advanced action and is usually recommended when a room is unstable due to bugs, missing features or security vulnerabilities.\nThis usually only affects how the room is processed on the server.</string>
|
||||
<string name="upgrade_public_room_from_to">You\'ll upgrade this room from %s to %s.</string>
|
||||
<string name="upgrade_public_room_from_to_version">You\'ll upgrade this room from %1$s to %2$s.</string>
|
||||
<string name="upgrade_room_auto_invite">Automatically invite users</string>
|
||||
<string name="upgrade_room_update_parent_space">Automatically update space parent</string>
|
||||
<string name="upgrade_room_no_power_to_manage">You need permission to upgrade a room</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user