mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 13:57:10 +09:00
parent
4475ace79b
commit
db8fcaefea
2 changed files with 11 additions and 6 deletions
|
@ -139,7 +139,7 @@ class MainSettingFragment : BaseBottomSheetComposeFragment() {
|
|||
safeNavigate(
|
||||
R.id.actionOpenImagePickerScreen, bundleOf(
|
||||
ARG_CONTEXT_ID_KEY to command.id,
|
||||
ARG_SHOW_REMOVE_BUTTON to true
|
||||
ARG_SHOW_REMOVE_BUTTON to command.showRemoveButton
|
||||
)
|
||||
)
|
||||
}
|
||||
|
|
|
@ -103,11 +103,16 @@ class MainSettingsViewModel(
|
|||
Event.OnDebugClicked -> {
|
||||
proceedWithSpaceDebug()
|
||||
}
|
||||
Event.OnSpaceImageClicked -> commands.emit(
|
||||
Command.OpenSpaceImageSet(
|
||||
configStorage.get().workspace
|
||||
Event.OnSpaceImageClicked -> {
|
||||
val showRemoveButton =
|
||||
(workspaceAndAccount.value as? WorkspaceAndAccount.Account)?.space?.icon !is SpaceIconView.Gradient
|
||||
commands.emit(
|
||||
Command.OpenSpaceImageSet(
|
||||
id = configStorage.get().workspace,
|
||||
showRemoveButton = showRemoveButton
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
Event.OnFilesStorageClicked -> {
|
||||
commands.emit(Command.OpenFilesStorageScreen)
|
||||
}
|
||||
|
@ -235,7 +240,7 @@ class MainSettingsViewModel(
|
|||
object OpenProfileScreen : Command()
|
||||
object OpenPersonalizationScreen : Command()
|
||||
object OpenDebugScreen : Command()
|
||||
class OpenSpaceImageSet(val id: Id) : Command()
|
||||
class OpenSpaceImageSet(val id: Id, val showRemoveButton: Boolean) : Command()
|
||||
object OpenFilesStorageScreen : Command()
|
||||
data class Toast(val msg: String, val isLongDuration: Boolean = false) : Command()
|
||||
data class ShareSpaceDebug(val path: Filepath): Command()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue