mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-25 11:05:25 +00:00
refactor: remove some logging, don't use blinded conversations in the list
This commit is contained in:
parent
d4f112e4b0
commit
ebdfd2538d
@ -1205,7 +1205,6 @@ open class Storage(context: Context, helper: SQLCipherOpenHelper, private val co
|
|||||||
val threadDB = DatabaseComponent.get(context).threadDatabase()
|
val threadDB = DatabaseComponent.get(context).threadDatabase()
|
||||||
threadDB.deleteConversation(threadID)
|
threadDB.deleteConversation(threadID)
|
||||||
if (recipient != null) {
|
if (recipient != null) {
|
||||||
Log.d("Loki-DBG", "Deleting conversation for ${recipient.address}")
|
|
||||||
if (recipient.isContactRecipient) {
|
if (recipient.isContactRecipient) {
|
||||||
if (recipient.isLocalNumber) return
|
if (recipient.isLocalNumber) return
|
||||||
val contacts = configFactory.contacts ?: return
|
val contacts = configFactory.contacts ?: return
|
||||||
|
@ -434,12 +434,9 @@ public class ThreadDatabase extends Database {
|
|||||||
String query = "SELECT COUNT (*) FROM " + TABLE_NAME +
|
String query = "SELECT COUNT (*) FROM " + TABLE_NAME +
|
||||||
" LEFT OUTER JOIN " + RecipientDatabase.TABLE_NAME +
|
" LEFT OUTER JOIN " + RecipientDatabase.TABLE_NAME +
|
||||||
" ON " + TABLE_NAME + "." + ADDRESS + " = " + RecipientDatabase.TABLE_NAME + "." + RecipientDatabase.ADDRESS +
|
" ON " + TABLE_NAME + "." + ADDRESS + " = " + RecipientDatabase.TABLE_NAME + "." + RecipientDatabase.ADDRESS +
|
||||||
" LEFT OUTER JOIN " + GroupDatabase.TABLE_NAME +
|
|
||||||
" ON " + TABLE_NAME + "." + ADDRESS + " = " + GroupDatabase.TABLE_NAME + "." + GROUP_ID +
|
|
||||||
" WHERE " + MESSAGE_COUNT + " != 0 AND " + ARCHIVED + " = 0 AND " + HAS_SENT + " = 0 AND " + MESSAGE_COUNT + " = " + UNREAD_COUNT + " AND " +
|
" WHERE " + MESSAGE_COUNT + " != 0 AND " + ARCHIVED + " = 0 AND " + HAS_SENT + " = 0 AND " + MESSAGE_COUNT + " = " + UNREAD_COUNT + " AND " +
|
||||||
RecipientDatabase.TABLE_NAME + "." + RecipientDatabase.BLOCK + " = 0 AND " +
|
RecipientDatabase.TABLE_NAME + "." + RecipientDatabase.BLOCK + " = 0 AND " +
|
||||||
RecipientDatabase.TABLE_NAME + "." + RecipientDatabase.APPROVED + " = 0 AND " +
|
RecipientDatabase.TABLE_NAME + "." + RecipientDatabase.APPROVED + " = 0";
|
||||||
GroupDatabase.TABLE_NAME + "." + GROUP_ID + " IS NULL";
|
|
||||||
cursor = db.rawQuery(query, null);
|
cursor = db.rawQuery(query, null);
|
||||||
|
|
||||||
if (cursor != null && cursor.moveToFirst())
|
if (cursor != null && cursor.moveToFirst())
|
||||||
|
@ -326,7 +326,7 @@ class HomeActivity : PassphraseRequiredActionBarActivity(),
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun setupMessageRequestsBanner() {
|
private fun setupMessageRequestsBanner() {
|
||||||
val messageRequestCount = threadDb.unapprovedConversationCount + threadDb.blindedConversationList.use { it.count }
|
val messageRequestCount = threadDb.unapprovedConversationCount
|
||||||
// Set up message requests
|
// Set up message requests
|
||||||
if (messageRequestCount > 0 && !textSecurePreferences.hasHiddenMessageRequests()) {
|
if (messageRequestCount > 0 && !textSecurePreferences.hasHiddenMessageRequests()) {
|
||||||
with(ViewMessageRequestBannerBinding.inflate(layoutInflater)) {
|
with(ViewMessageRequestBannerBinding.inflate(layoutInflater)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user