mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 16:33:39 +00:00
Clean
This commit is contained in:
parent
b44ff69d8d
commit
151e97c82e
@ -1653,7 +1653,6 @@
|
||||
<string name="dialog_device_unlink_title">Device unlinked</string>
|
||||
<string name="dialog_device_unlink_message">This device has been successfully unlinked</string>
|
||||
<!-- Session restore banner -->
|
||||
<string name="session_restore_banner_title">Could not decrypt an incoming message.</string>
|
||||
<string name="session_restore_banner_message">Would you like to start a new session with %s?</string>
|
||||
<string name="session_restore_banner_restore_button_title">Restore session</string>
|
||||
<string name="session_restore_banner_dismiss_button_title">Dismiss</string>
|
||||
|
@ -83,7 +83,7 @@ public interface MmsSmsColumns {
|
||||
protected static final long ENCRYPTION_REMOTE_LEGACY_BIT = 0x02000000;
|
||||
|
||||
// Loki
|
||||
protected static final long ENCRYPTION_LOKI_SESSION_RESTORE_SENT_BIT = 0x01000000; // Type that determines if we've sent a session reset after receiving `ENCRYPTION_REMOTE_NO_SESSION_BIT`
|
||||
protected static final long ENCRYPTION_LOKI_SESSION_RESTORE_SENT_BIT = 0x01000000;
|
||||
|
||||
public static boolean isDraftMessageType(long type) {
|
||||
return (type & BASE_TYPE_MASK) == BASE_DRAFT_TYPE;
|
||||
|
@ -732,21 +732,6 @@ public class SmsDatabase extends MessagingDatabase {
|
||||
else return record;
|
||||
}
|
||||
|
||||
public List<SmsMessageRecord> getMessages(long threadId) {
|
||||
SQLiteDatabase db = databaseHelper.getReadableDatabase();
|
||||
Cursor cursor = db.query(TABLE_NAME, MESSAGE_PROJECTION, THREAD_ID + " = ?", new String[]{ threadId + "" }, null, null, null);
|
||||
Reader reader = new Reader(cursor);
|
||||
List<SmsMessageRecord> records = new ArrayList<>();
|
||||
SmsMessageRecord record = reader.getNext();
|
||||
while (record != null) {
|
||||
records.add(record);
|
||||
record = reader.getNext();
|
||||
}
|
||||
|
||||
reader.close();
|
||||
return records;
|
||||
}
|
||||
|
||||
public Cursor getMessageCursor(long messageId) {
|
||||
SQLiteDatabase db = databaseHelper.getReadableDatabase();
|
||||
Cursor cursor = db.query(TABLE_NAME, MESSAGE_PROJECTION, ID_WHERE, new String[] {messageId + ""}, null, null, null);
|
||||
|
@ -1,18 +0,0 @@
|
||||
package org.thoughtcrime.securesms.loki
|
||||
|
||||
import org.thoughtcrime.securesms.util.Debouncer
|
||||
|
||||
object DebouncerCache {
|
||||
private val cache: HashMap<String, Debouncer> = hashMapOf()
|
||||
@JvmStatic
|
||||
fun getDebouncer(key: String, threshold: Long): Debouncer {
|
||||
val throttler = cache[key] ?: Debouncer(threshold)
|
||||
cache[key] = throttler
|
||||
return throttler
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun remove(key: String) {
|
||||
cache.remove(key)
|
||||
}
|
||||
}
|
@ -26,10 +26,11 @@ object FriendRequestHandler {
|
||||
ActionType.Failed -> LokiThreadFriendRequestStatus.NONE
|
||||
ActionType.Sent -> LokiThreadFriendRequestStatus.REQUEST_SENT
|
||||
}
|
||||
DatabaseFactory.getLokiThreadDatabase(context).setFriendRequestStatus(threadId, threadFriendStatus)
|
||||
val database = DatabaseFactory.getLokiThreadDatabase(context)
|
||||
database.setFriendRequestStatus(threadId, threadFriendStatus)
|
||||
// If we sent a friend request then we need to hide the session restore prompt
|
||||
if (type == ActionType.Sent) {
|
||||
// TODO: Hide prompt
|
||||
database.removeAllSessionRestoreDevices(threadId)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user