Small fixes

This commit is contained in:
Natsumi
2021-01-18 06:24:26 +13:00
parent 0cd033366b
commit 5c399d5f2f
2 changed files with 12 additions and 7 deletions

View File

@@ -3481,10 +3481,10 @@ speechSynthesis.getVoices();
++j;
}
}
// invite, requestInvite, friendRequest
var { data } = this.notificationTable;
for (i = 0; i < data.length; i++) {
for (var i = 0; i < data.length; i++) {
var ctx = data[i];
// invite, requestInvite, friendRequest
if (ctx.senderUserId !== API.currentUser.id) {
arr.push({
...ctx,
@@ -3493,17 +3493,22 @@ speechSynthesis.getVoices();
});
}
}
// TrustLevel, Friend, FriendRequest, Unfriend, DisplayName
var { data } = this.friendLogTable;
var j = this.friendLogTable.data.length;
for (i = j - 1; i >= j - ((j > 10) ? 10 : j); i--) {
var ctx = data[i];
var i = data.length;
var j = 0;
while (j < 10) {
if (i <= 0) {
break;
}
var ctx = data[--i];
// TrustLevel, Friend, FriendRequest, Unfriend, DisplayName
if (ctx.type !== 'FriendRequest') {
arr.push({
...ctx,
isFriend: this.friends.has(ctx.userId),
isFavorite: API.cachedFavoritesByObjectId.has(ctx.userId)
});
++j;
}
}
arr.sort(function (a, b) {

View File

@@ -847,7 +847,7 @@ speechSynthesis.getVoices();
break;
}
if ((feedItem.created_at < bias) || (feedItem.type === 'Location') ||
((feedItem.type === 'GPS') && (feedItem.location !== ctx.location[0]) &&
((feedItem.type === 'GPS') && (feedItem.created_at !== ctx.created_at) &&
(feedItem.displayName === ctx.displayName))) {
break;
}