This commit is contained in:
nuclearfog 2023-04-19 09:00:00 +02:00
parent 3ee70dc392
commit 51b824cfc1
No known key found for this signature in database
GPG Key ID: 03488A185C476379
11 changed files with 31 additions and 9 deletions

View File

@ -106,6 +106,8 @@ public class MastodonList implements UserList {
@Override @Override
public int compareTo(UserList userlist) { public int compareTo(UserList userlist) {
if (userlist.getTimestamp() != getTimestamp())
return Long.compare(userlist.getTimestamp(), getTimestamp());
return Long.compare(userlist.getId(), getId()); return Long.compare(userlist.getId(), getId());
} }

View File

@ -122,7 +122,9 @@ public class MastodonNotification implements Notification {
@Override @Override
public int compareTo(Notification notification) { public int compareTo(Notification notification) {
if (notification.getTimestamp() != getTimestamp())
return Long.compare(notification.getTimestamp(), getTimestamp()); return Long.compare(notification.getTimestamp(), getTimestamp());
return Long.compare(notification.getId(), getId());
} }

View File

@ -363,7 +363,9 @@ public class MastodonStatus implements Status {
@Override @Override
public int compareTo(Status status) { public int compareTo(Status status) {
if (status.getTimestamp() != getTimestamp())
return Long.compare(status.getTimestamp(), getTimestamp()); return Long.compare(status.getTimestamp(), getTimestamp());
return Long.compare(status.getId(), getId());
} }

View File

@ -112,7 +112,9 @@ public class MessageV1 implements Message {
@Override @Override
public int compareTo(Message message) { public int compareTo(Message message) {
if (message.getTimestamp() != getTimestamp())
return Long.compare(message.getTimestamp(), getTimestamp()); return Long.compare(message.getTimestamp(), getTimestamp());
return Long.compare(message.getId(), getId());
} }
/** /**

View File

@ -66,7 +66,9 @@ public class NotificationV1 implements Notification {
@Override @Override
public int compareTo(Notification notification) { public int compareTo(Notification notification) {
if (notification.getTimestamp() != getTimestamp())
return Long.compare(notification.getTimestamp(), getTimestamp()); return Long.compare(notification.getTimestamp(), getTimestamp());
return Long.compare(notification.getId(), getId());
} }

View File

@ -337,7 +337,9 @@ public class TweetV1 implements Status {
@Override @Override
public int compareTo(Status status) { public int compareTo(Status status) {
if (status.getTimestamp() != getTimestamp())
return Long.compare(status.getTimestamp(), getTimestamp()); return Long.compare(status.getTimestamp(), getTimestamp());
return Long.compare(status.getId(), getId());
} }

View File

@ -126,6 +126,8 @@ public class UserListV1 implements UserList {
@Override @Override
public int compareTo(UserList userlist) { public int compareTo(UserList userlist) {
if (userlist.getTimestamp() != getTimestamp())
return Long.compare(userlist.getTimestamp(), getTimestamp());
return Long.compare(userlist.getId(), getId()); return Long.compare(userlist.getId(), getId());
} }

View File

@ -411,7 +411,9 @@ public class TweetV2 implements Status {
@Override @Override
public int compareTo(Status status) { public int compareTo(Status status) {
if (status.getTimestamp() != getTimestamp())
return Long.compare(status.getTimestamp(), getTimestamp()); return Long.compare(status.getTimestamp(), getTimestamp());
return Long.compare(status.getId(), getId());
} }

View File

@ -105,7 +105,9 @@ public class DatabaseMessage implements Message, MessageTable {
@Override @Override
public int compareTo(Message message) { public int compareTo(Message message) {
if (message.getTimestamp() != getTimestamp())
return Long.compare(message.getTimestamp(), getTimestamp()); return Long.compare(message.getTimestamp(), getTimestamp());
return Long.compare(message.getId(), getId());
} }
/** /**

View File

@ -99,7 +99,9 @@ public class DatabaseNotification implements Notification, NotificationTable {
@Override @Override
public int compareTo(Notification notification) { public int compareTo(Notification notification) {
if (notification.getTimestamp() != getTimestamp())
return Long.compare(notification.getTimestamp(), getTimestamp()); return Long.compare(notification.getTimestamp(), getTimestamp());
return Long.compare(notification.getId(), getId());
} }

View File

@ -312,7 +312,9 @@ public class DatabaseStatus implements Status, StatusTable, StatusRegisterTable
@Override @Override
public int compareTo(Status status) { public int compareTo(Status status) {
if (status.getTimestamp() != getTimestamp())
return Long.compare(status.getTimestamp(), getTimestamp()); return Long.compare(status.getTimestamp(), getTimestamp());
return Long.compare(status.getId(), getId());
} }