mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-25 22:39:22 +00:00
Make close window button lives
This commit is contained in:
parent
476f08681b
commit
6bdaf83563
@ -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;
|
||||
|
||||
if (widget.onClose == null)
|
||||
MainController.of(context).popPage();
|
||||
else
|
||||
widget.onClose();
|
||||
}
|
||||
|
||||
/// Start streaming on our end
|
||||
|
@ -63,6 +63,7 @@ class _CallWindowWidgetState extends State<CallWindowWidget> {
|
||||
)),
|
||||
convID: widget.convID,
|
||||
floatingButtons: false,
|
||||
onClose: widget.onClose,
|
||||
),
|
||||
),
|
||||
feedback: Container(
|
||||
|
Loading…
Reference in New Issue
Block a user