mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-21 12:35:30 +03:00
store lock setting in arbitrary storage
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
parent
50569a09af
commit
17e105b09c
1 changed files with 6 additions and 4 deletions
|
@ -839,13 +839,15 @@ class ConversationInfoActivity :
|
|||
binding.archiveConversationText.text = resources.getString(R.string.archive_conversation)
|
||||
binding.archiveConversationTextHint.text = resources.getString(R.string.archive_hint)
|
||||
}
|
||||
|
||||
if (ConversationUtils.isConversationReadOnlyAvailable(conversationCopy, spreedCapabilities)) {
|
||||
binding.lockConversation.visibility = VISIBLE
|
||||
binding.lockConversationSwitch.isChecked = databaseStorageModule!!.getBoolean("lock_switch", false)
|
||||
|
||||
binding.lockConversation.setOnClickListener {
|
||||
val isChecked = binding.lockConversationSwitch.isChecked
|
||||
binding.lockConversationSwitch.isChecked = !isChecked
|
||||
val state = if (isChecked) 0 else 1
|
||||
val isLocked = binding.lockConversationSwitch.isChecked
|
||||
binding.lockConversationSwitch.isChecked = !isLocked
|
||||
databaseStorageModule!!.saveBoolean("lock_switch", !isLocked)
|
||||
val state = if (isLocked) 0 else 1
|
||||
makeConversationReadOnly(conversationUser, conversationToken, state)
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue