Fix various UI bugs for chat folders.

This commit is contained in:
Michelle Tang
2024-11-01 16:28:45 -04:00
committed by GitHub
parent 90ff3d1e32
commit d115835606
5 changed files with 56 additions and 65 deletions

View File

@@ -234,13 +234,12 @@ class ChatFolderTables(context: Context?, databaseHelper: SignalDatabase?) : Dat
}
/**
* Returns the number of user-made folders
* Returns the number of folders a user has, including the default 'All Chats'
*/
fun getFolderCount(): Int {
return readableDatabase
.count()
.from(ChatFolderTable.TABLE_NAME)
.where("${ChatFolderTable.FOLDER_TYPE} != ${ChatFolderRecord.FolderType.ALL.value}")
.run()
.readToSingleInt()
}