mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-07-03 15:13:29 +00:00
Load memberships
This commit is contained in:
@ -96,7 +96,7 @@ class ConversationsHelper {
|
||||
|
||||
try {
|
||||
ConversationsList list = ConversationsList();
|
||||
response.getArray().forEach((f) => list.add(_apiToConversation(f)));
|
||||
response.getArray().forEach((f) => list.add(apiToConversation(f)));
|
||||
|
||||
// Update the database
|
||||
await _conversationsDatabaseHelper.clearTable();
|
||||
@ -126,7 +126,7 @@ class ConversationsHelper {
|
||||
|
||||
if (response.code != 200) return null;
|
||||
|
||||
final conversation = _apiToConversation(response.getObject());
|
||||
final conversation = apiToConversation(response.getObject());
|
||||
_conversationsDatabaseHelper.insertOrUpdate(conversation);
|
||||
return conversation;
|
||||
} on Exception catch (e) {
|
||||
@ -222,7 +222,7 @@ class ConversationsHelper {
|
||||
}
|
||||
|
||||
/// Turn an API entry into a [Conversation] object
|
||||
Conversation _apiToConversation(Map<String, dynamic> map) {
|
||||
static Conversation apiToConversation(Map<String, dynamic> map) {
|
||||
return Conversation(
|
||||
id: map["ID"],
|
||||
ownerID: map["ID_owner"],
|
||||
|
Reference in New Issue
Block a user