1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-19 00:05:16 +00:00

Show cached conversations list before getting list from the server

This commit is contained in:
2019-04-24 15:03:36 +02:00
parent eb34ed5c3d
commit 4be5a1b5a8
5 changed files with 79 additions and 16 deletions

View File

@ -7,7 +7,7 @@ import 'package:meta/meta.dart';
///
/// @author Pierre HUBERT
class Conversation extends CacheModel {
class Conversation extends CacheModel implements Comparable {
final int ownerID;
final int lastActive;
final String name;
@ -56,4 +56,9 @@ class Conversation extends CacheModel {
ConversationTableContract.C_MEMBERS: members.join(","),
};
}
@override
int compareTo(other) {
return other.lastActive.compareTo(this.lastActive);
}
}