1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-22 04:49: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]
Future<Conversation> _downloadSingle(int id) async {
try {
final response = await APIRequest(
uri: "conversations/get_single",
needLogin: true,
args: {"conversationID": id.toString()}).execWithThrow();
final response = await APIRequest(
uri: "conversations/get_single",
needLogin: true,
args: {"conversationID": id.toString()}).execWithThrow();
final conversation = apiToConversation(response.getObject());
final conversation = apiToConversation(response.getObject());
await ConversationsSerializationHelper()
.insertOrReplaceElement((c) => c.id == conversation.id, conversation);
return conversation;
} on Exception catch (e, s) {
print("Could not get information about a single conversation ! $e => $s");
return null;
}
await ConversationsSerializationHelper()
.insertOrReplaceElement((c) => c.id == conversation.id, conversation);
return conversation;
}
/// Get information about a conversation. If [force] is set to false, a