mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 08:15:16 +00:00
Make close window button lives
This commit is contained in:
@ -36,11 +36,17 @@ class CallScreen extends StatefulWidget {
|
||||
/// String which is the title of the conversation
|
||||
final PreferredSizeWidget Function(String) buildCustomAppBar;
|
||||
|
||||
/// Execute custom action when the call is closed
|
||||
///
|
||||
/// The default behavior is to pop the page
|
||||
final void Function() onClose;
|
||||
|
||||
const CallScreen({
|
||||
Key key,
|
||||
@required this.convID,
|
||||
this.floatingButtons = true,
|
||||
this.buildCustomAppBar,
|
||||
this.onClose,
|
||||
}) : assert(convID != null),
|
||||
assert(convID > 0),
|
||||
assert(floatingButtons != null),
|
||||
@ -198,7 +204,10 @@ class _CallScreenState extends SafeState<CallScreen> {
|
||||
context: context,
|
||||
message: tr("Do you really want to leave this call ?"))) return;
|
||||
|
||||
MainController.of(context).popPage();
|
||||
if (widget.onClose == null)
|
||||
MainController.of(context).popPage();
|
||||
else
|
||||
widget.onClose();
|
||||
}
|
||||
|
||||
/// Start streaming on our end
|
||||
|
Reference in New Issue
Block a user