mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-21 20:45:29 +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.archiveConversationText.text = resources.getString(R.string.archive_conversation)
|
||||||
binding.archiveConversationTextHint.text = resources.getString(R.string.archive_hint)
|
binding.archiveConversationTextHint.text = resources.getString(R.string.archive_hint)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ConversationUtils.isConversationReadOnlyAvailable(conversationCopy, spreedCapabilities)) {
|
if (ConversationUtils.isConversationReadOnlyAvailable(conversationCopy, spreedCapabilities)) {
|
||||||
binding.lockConversation.visibility = VISIBLE
|
binding.lockConversation.visibility = VISIBLE
|
||||||
|
binding.lockConversationSwitch.isChecked = databaseStorageModule!!.getBoolean("lock_switch", false)
|
||||||
|
|
||||||
binding.lockConversation.setOnClickListener {
|
binding.lockConversation.setOnClickListener {
|
||||||
val isChecked = binding.lockConversationSwitch.isChecked
|
val isLocked = binding.lockConversationSwitch.isChecked
|
||||||
binding.lockConversationSwitch.isChecked = !isChecked
|
binding.lockConversationSwitch.isChecked = !isLocked
|
||||||
val state = if (isChecked) 0 else 1
|
databaseStorageModule!!.saveBoolean("lock_switch", !isLocked)
|
||||||
|
val state = if (isLocked) 0 else 1
|
||||||
makeConversationReadOnly(conversationUser, conversationToken, state)
|
makeConversationReadOnly(conversationUser, conversationToken, state)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue