mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-01-13 08:27:51 +00:00
fix notification about new DMs on my own twists
This commit is contained in:
parent
9e17f2da10
commit
8e167315d6
@ -203,8 +203,11 @@ function requestDMsCount() {
|
||||
var newDMsUpdated;
|
||||
|
||||
for (var u in dmUsers) {
|
||||
if (dmUsers[u]) {
|
||||
var dmData = dmUsers[u][0];
|
||||
if (!dmUsers[u])
|
||||
continue;
|
||||
|
||||
var dmData = dmUsers[u][0];
|
||||
if (dmData.from !== defaultScreenName) {
|
||||
if (u in _lastDMIdPerUser && u in _newDMsPerUser) {
|
||||
if (dmData.id !== _lastDMIdPerUser[u]) {
|
||||
_newDMsPerUser[u] += dmData.id - _lastDMIdPerUser[u];
|
||||
@ -214,8 +217,8 @@ function requestDMsCount() {
|
||||
_newDMsPerUser[u] = dmData.id + 1;
|
||||
newDMsUpdated = true;
|
||||
}
|
||||
_lastDMIdPerUser[u] = dmData.id;
|
||||
}
|
||||
_lastDMIdPerUser[u] = dmData.id;
|
||||
}
|
||||
if (newDMsUpdated) {
|
||||
saveDMsToStorage();
|
||||
|
Loading…
Reference in New Issue
Block a user