mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-22 12:59:21 +00:00
Can create new conversations
This commit is contained in:
parent
27176531cf
commit
c262e40e81
@ -48,7 +48,7 @@ abstract class MainController extends State<MainRoute> {
|
||||
void doPopPage();
|
||||
|
||||
/// Push a new widget
|
||||
void push(Widget w, {bool hideNavBar});
|
||||
void push(Widget w, {bool hideNavBar, bool allowAsDialog});
|
||||
|
||||
/// Open a conversation
|
||||
void openConversation(int convID, {fullScreen: false});
|
||||
|
@ -243,7 +243,7 @@ class _MainRouteState extends MainController {
|
||||
}
|
||||
|
||||
@override
|
||||
void push(Widget w, {bool hideNavBar = false}) {
|
||||
void push(Widget w, {bool hideNavBar = false, bool allowAsDialog}) {
|
||||
_pushPage(CurrPage(
|
||||
BarCallbackActions.OPEN_CUSTOM_WIDGET,
|
||||
args: {"widget": w},
|
||||
|
@ -1,3 +1,4 @@
|
||||
import 'package:comunic/ui/dialogs/screen_dialog.dart';
|
||||
import 'package:comunic/ui/routes/main_route/main_route.dart';
|
||||
import 'package:comunic/ui/widgets/tablet_mode/conversations/conversations_area_widget.dart';
|
||||
import 'package:comunic/ui/widgets/tablet_mode/current_user_panel.dart';
|
||||
@ -89,7 +90,12 @@ class _TabletRouteState extends MainController {
|
||||
}
|
||||
|
||||
@override
|
||||
void push(Widget w, {bool hideNavBar}) {
|
||||
void push(Widget w, {bool hideNavBar, bool allowAsDialog}) {
|
||||
if (allowAsDialog == true) {
|
||||
showScreenDialog(context, w);
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: implement push
|
||||
}
|
||||
|
||||
|
@ -116,7 +116,9 @@ class _ConversationScreenState extends SafeState<ConversationsListScreen> {
|
||||
|
||||
/// Create a new conversation
|
||||
void _createConversation() {
|
||||
MainController.of(context).push(CreateConversationScreen());
|
||||
MainController.of(context)
|
||||
.push(CreateConversationScreen(), allowAsDialog: true);
|
||||
if (widget.onOpen != null) widget.onOpen();
|
||||
}
|
||||
|
||||
/// Handle conversations updated requests
|
||||
|
Loading…
Reference in New Issue
Block a user