mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-12 07:57:43 +00:00
fix: attachment downloads and uploads
enable multi-threaded attachment handling for messages to speed up download/upload and free up message processing queue. leaving group removes appropriate entries now in threaddb
This commit is contained in:
@@ -580,7 +580,7 @@ class Storage(context: Context, helper: SQLCipherOpenHelper) : Database(context,
|
||||
val mmsDb = DatabaseFactory.getMmsDatabase(context)
|
||||
val cursor = mmsDb.getMessage(mmsId)
|
||||
val reader = mmsDb.readerFor(cursor)
|
||||
return reader.current.threadId
|
||||
return reader.next.threadId
|
||||
}
|
||||
|
||||
override fun getSessionRequestSentTimestamp(publicKey: String): Long? {
|
||||
|
@@ -189,6 +189,9 @@ class EnterChatURLFragment : Fragment() {
|
||||
}
|
||||
chip.chipIcon = drawable
|
||||
chip.text = defaultGroup.name
|
||||
chip.setOnClickListener {
|
||||
(requireActivity() as JoinPublicChatActivity).joinPublicChatIfPossible(defaultGroup.toJoinUrl())
|
||||
}
|
||||
defaultRoomsGridLayout.addView(chip)
|
||||
}
|
||||
if (groups.size and 1 != 0) {
|
||||
|
@@ -172,6 +172,7 @@ class PublicChatManager(private val context: Context) {
|
||||
|
||||
DatabaseFactory.getLokiThreadDatabase(context).removePublicChat(threadID)
|
||||
pollers.remove(threadID)?.stop()
|
||||
v2Pollers.remove(threadID)?.stop()
|
||||
observers.remove(threadID)
|
||||
startPollersIfNeeded()
|
||||
}
|
||||
|
@@ -89,7 +89,7 @@ class LokiThreadDatabase(context: Context, helper: SQLCipherOpenHelper) : Databa
|
||||
return null
|
||||
}
|
||||
val database = databaseHelper.readableDatabase
|
||||
return database.get(publicChat, "${Companion.threadID} = ?", arrayOf(threadID.toString())) { cursor ->
|
||||
return database.get(publicChatTable, "${Companion.threadID} = ?", arrayOf(threadID.toString())) { cursor ->
|
||||
val json = cursor.getString(publicChat)
|
||||
OpenGroupV2.fromJson(json)
|
||||
}
|
||||
|
Reference in New Issue
Block a user