mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 00:59:49 +01:00
Implement username is out of sync banner.
This commit is contained in:
committed by
Greyson Parrelli
parent
4954be109c
commit
a398745740
@@ -2085,6 +2085,16 @@ open class RecipientTable(context: Context, databaseHelper: SignalDatabase) : Da
|
||||
}
|
||||
}
|
||||
|
||||
fun getUsername(id: RecipientId): String? {
|
||||
return writableDatabase.query(TABLE_NAME, arrayOf(USERNAME), "$ID = ?", SqlUtil.buildArgs(id), null, null, null).use {
|
||||
if (it.moveToFirst()) {
|
||||
it.requireString(USERNAME)
|
||||
} else {
|
||||
null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun setUsername(id: RecipientId, username: String?) {
|
||||
writableDatabase.withinTransaction {
|
||||
if (username != null) {
|
||||
|
||||
Reference in New Issue
Block a user