Merge (un)encrypted storage layers
This commit is contained in:
parent
454b4726bd
commit
00cb420d37
12 changed files with 102 additions and 143 deletions
|
@ -33,14 +33,14 @@
|
|||
inbox.on('change:unreadCount', function(model, count) {
|
||||
var prev = model.previous('unreadCount');
|
||||
if (count < prev) { // decreased
|
||||
var newUnreadCount = textsecure.storage.getUnencrypted("unreadCount") - (prev - count);
|
||||
var newUnreadCount = textsecure.storage.get("unreadCount") - (prev - count);
|
||||
if (newUnreadCount <= 0) {
|
||||
newUnreadCount = 0;
|
||||
extension.navigator.setBadgeText("");
|
||||
} else {
|
||||
extension.navigator.setBadgeText(newUnreadCount);
|
||||
}
|
||||
textsecure.storage.putUnencrypted("unreadCount", newUnreadCount);
|
||||
textsecure.storage.put("unreadCount", newUnreadCount);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue