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

Display the name of the call

This commit is contained in:
2020-04-20 13:19:49 +02:00
parent 0a03f581d1
commit da641515fa
2 changed files with 80 additions and 3 deletions

View File

@ -143,6 +143,19 @@ class ConversationsHelper {
return _conversationsDatabaseHelper.get(id);
}
/// Get information about a conversation. The method throws an [Exception] in
/// case of failure
///
/// Return value of this method is never null.
Future<Conversation> getSingleOrThrow(int id, {bool force = false}) async {
final conv = await this.getSingle(id, force: force);
if (conv == null)
throw Exception("Could not get information about the conversation!");
return conv;
}
/// Get the name of a [conversation]. This requires information
/// about the users of this conversation
static String getConversationName(
@ -187,7 +200,7 @@ class ConversationsHelper {
}
}
/// Asynchronously get the name fo the conversation
/// Asynchronously get the name of the conversation
///
/// Unlike the synchronous method, this method does not need information
/// about the members of the conversation