1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-22 12:59:21 +00:00

Remove misplaced try catch block

This commit is contained in:
Pierre HUBERT 2021-03-13 13:32:38 +01:00
parent a630a5ae79
commit f9db9aa632

View File

@ -148,21 +148,16 @@ class ConversationsHelper {
/// Get information about a single conversation specified by its [id] /// Get information about a single conversation specified by its [id]
Future<Conversation> _downloadSingle(int id) async { Future<Conversation> _downloadSingle(int id) async {
try { final response = await APIRequest(
final response = await APIRequest( uri: "conversations/get_single",
uri: "conversations/get_single", needLogin: true,
needLogin: true, args: {"conversationID": id.toString()}).execWithThrow();
args: {"conversationID": id.toString()}).execWithThrow();
final conversation = apiToConversation(response.getObject()); final conversation = apiToConversation(response.getObject());
await ConversationsSerializationHelper() await ConversationsSerializationHelper()
.insertOrReplaceElement((c) => c.id == conversation.id, conversation); .insertOrReplaceElement((c) => c.id == conversation.id, conversation);
return conversation; return conversation;
} on Exception catch (e, s) {
print("Could not get information about a single conversation ! $e => $s");
return null;
}
} }
/// Get information about a conversation. If [force] is set to false, a /// Get information about a conversation. If [force] is set to false, a