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

Start conversation upgrade

This commit is contained in:
2021-03-10 17:54:41 +01:00
parent b094361f5a
commit dacccf57b5
35 changed files with 818 additions and 520 deletions

View File

@ -10,16 +10,16 @@ import 'package:flutter/material.dart';
/// Open a private conversation with a given [userID]
Future<bool> openPrivateConversation(BuildContext context, int userID) async {
final convID = await ConversationsHelper().getPrivate(userID);
try {
final convID = await ConversationsHelper().getPrivate(userID);
if (convID == null) {
// Open the conversation
MainController.of(context).openConversation(convID);
return true;
} catch (e, s) {
print("Failed to find private conversation! $e => $s");
showSimpleSnack(context, tr("Could not find a private conversation!"));
return false;
}
// Open the conversation
MainController.of(context).openConversation(convID);
// Success
return true;
}