mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-02 20:26:47 +01:00
Cleanup
This commit is contained in:
parent
a813610c04
commit
476f721f5e
@ -24,11 +24,10 @@ class RoomHistoryVisibilityAction(
|
|||||||
val roomHistoryVisibility: RoomHistoryVisibility,
|
val roomHistoryVisibility: RoomHistoryVisibility,
|
||||||
title: String,
|
title: String,
|
||||||
@DrawableRes iconResId: Int,
|
@DrawableRes iconResId: Int,
|
||||||
isSelected: Boolean,
|
isSelected: Boolean
|
||||||
destructive: Boolean
|
|
||||||
) : BottomSheetGenericAction(
|
) : BottomSheetGenericAction(
|
||||||
title = title,
|
title = title,
|
||||||
iconResId = iconResId,
|
iconResId = iconResId,
|
||||||
isSelected = isSelected,
|
isSelected = isSelected,
|
||||||
destructive = destructive
|
destructive = false
|
||||||
)
|
)
|
||||||
|
@ -37,8 +37,7 @@ class RoomHistoryVisibilityController @Inject constructor(
|
|||||||
roomHistoryVisibility = roomHistoryVisibility,
|
roomHistoryVisibility = roomHistoryVisibility,
|
||||||
title = historyVisibilityFormatter.getSetting(roomHistoryVisibility),
|
title = historyVisibilityFormatter.getSetting(roomHistoryVisibility),
|
||||||
iconResId = 0,
|
iconResId = 0,
|
||||||
isSelected = roomHistoryVisibility == state.currentRoomHistoryVisibility,
|
isSelected = roomHistoryVisibility == state.currentRoomHistoryVisibility
|
||||||
destructive = false
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,11 +26,10 @@ class RoomJoinRuleAction(
|
|||||||
val roomGuestAccess: GuestAccess?,
|
val roomGuestAccess: GuestAccess?,
|
||||||
title: String,
|
title: String,
|
||||||
@DrawableRes iconResId: Int,
|
@DrawableRes iconResId: Int,
|
||||||
isSelected: Boolean,
|
isSelected: Boolean
|
||||||
destructive: Boolean
|
|
||||||
) : BottomSheetGenericAction(
|
) : BottomSheetGenericAction(
|
||||||
title = title,
|
title = title,
|
||||||
iconResId = iconResId,
|
iconResId = iconResId,
|
||||||
isSelected = isSelected,
|
isSelected = isSelected,
|
||||||
destructive = destructive
|
destructive = false
|
||||||
)
|
)
|
||||||
|
@ -34,24 +34,21 @@ class RoomJoinRuleController @Inject constructor(
|
|||||||
roomGuestAccess = null,
|
roomGuestAccess = null,
|
||||||
title = stringProvider.getString(R.string.room_settings_room_access_entry_only_invited),
|
title = stringProvider.getString(R.string.room_settings_room_access_entry_only_invited),
|
||||||
iconResId = 0,
|
iconResId = 0,
|
||||||
isSelected = state.currentRoomJoinRule == RoomJoinRules.INVITE,
|
isSelected = state.currentRoomJoinRule == RoomJoinRules.INVITE
|
||||||
destructive = false
|
|
||||||
),
|
),
|
||||||
RoomJoinRuleAction(
|
RoomJoinRuleAction(
|
||||||
roomJoinRule = RoomJoinRules.PUBLIC,
|
roomJoinRule = RoomJoinRules.PUBLIC,
|
||||||
roomGuestAccess = GuestAccess.Forbidden,
|
roomGuestAccess = GuestAccess.Forbidden,
|
||||||
title = stringProvider.getString(R.string.room_settings_room_access_entry_anyone_with_link_apart_guest),
|
title = stringProvider.getString(R.string.room_settings_room_access_entry_anyone_with_link_apart_guest),
|
||||||
iconResId = 0,
|
iconResId = 0,
|
||||||
isSelected = state.currentRoomJoinRule == RoomJoinRules.PUBLIC && state.currentGuestAccess == GuestAccess.Forbidden,
|
isSelected = state.currentRoomJoinRule == RoomJoinRules.PUBLIC && state.currentGuestAccess == GuestAccess.Forbidden
|
||||||
destructive = false
|
|
||||||
),
|
),
|
||||||
RoomJoinRuleAction(
|
RoomJoinRuleAction(
|
||||||
roomJoinRule = RoomJoinRules.PUBLIC,
|
roomJoinRule = RoomJoinRules.PUBLIC,
|
||||||
roomGuestAccess = GuestAccess.CanJoin,
|
roomGuestAccess = GuestAccess.CanJoin,
|
||||||
title = stringProvider.getString(R.string.room_settings_room_access_entry_anyone_with_link_including_guest),
|
title = stringProvider.getString(R.string.room_settings_room_access_entry_anyone_with_link_including_guest),
|
||||||
iconResId = 0,
|
iconResId = 0,
|
||||||
isSelected = state.currentRoomJoinRule == RoomJoinRules.PUBLIC && state.currentGuestAccess == GuestAccess.CanJoin,
|
isSelected = state.currentRoomJoinRule == RoomJoinRules.PUBLIC && state.currentGuestAccess == GuestAccess.CanJoin
|
||||||
destructive = false
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user