mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 16:57:50 +00:00
Fix public chat deletion
This commit is contained in:
parent
60da6dc58c
commit
93e1cd7756
@ -202,11 +202,14 @@ class HomeActivity : PassphraseRequiredActionBarActivity, ConversationClickListe
|
||||
|
||||
override fun run() {
|
||||
AsyncTask.execute {
|
||||
threadDatabase.deleteConversation(threadID)
|
||||
val publicChat = DatabaseFactory.getLokiThreadDatabase(activity).getPublicChat(threadID)
|
||||
if (publicChat != null) {
|
||||
val apiDatabase = DatabaseFactory.getLokiAPIDatabase(activity)
|
||||
apiDatabase.removeLastMessageServerID(publicChat.channel, publicChat.server)
|
||||
apiDatabase.removeLastDeletionServerID(publicChat.channel, publicChat.server)
|
||||
ApplicationContext.getInstance(activity).lokiPublicChatAPI!!.leave(publicChat.channel, publicChat.server)
|
||||
}
|
||||
threadDatabase.deleteConversation(threadID)
|
||||
MessageNotifier.updateNotification(activity)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user