aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2022-02-12 17:32:13 +0100
committerfiaxh <git@lightrise.org>2022-02-12 17:35:46 +0100
commit06f0bc00f14046dfb72794e0fcf516d240250e21 (patch)
tree30f7977790beebef2159427da374b9b8ce483448 /main/src/ui
parentb586aebbac20ea03509e42e54f1632d654ea968d (diff)
downloaddino-06f0bc00f14046dfb72794e0fcf516d240250e21.tar.gz
dino-06f0bc00f14046dfb72794e0fcf516d240250e21.zip
Calls: Show invite button quicker
Diffstat (limited to 'main/src/ui')
-rw-r--r--main/src/ui/call_window/call_window_controller.vala2
-rw-r--r--main/src/ui/call_window/participant_widget.vala8
2 files changed, 7 insertions, 3 deletions
diff --git a/main/src/ui/call_window/call_window_controller.vala b/main/src/ui/call_window/call_window_controller.vala
index 6ea69287..65e5ebd6 100644
--- a/main/src/ui/call_window/call_window_controller.vala
+++ b/main/src/ui/call_window/call_window_controller.vala
@@ -156,7 +156,7 @@ public class Dino.Ui.CallWindowController : Object {
update_audio_device_choices();
update_video_device_choices();
- } else if (participant_widgets.size >= 1) {
+ } else if (participant_widgets.size > 1) {
participant_widgets.values.@foreach((widget) => widget.may_show_invite_button = true);
}
});
diff --git a/main/src/ui/call_window/participant_widget.vala b/main/src/ui/call_window/participant_widget.vala
index 0d8d25b4..e21ab586 100644
--- a/main/src/ui/call_window/participant_widget.vala
+++ b/main/src/ui/call_window/participant_widget.vala
@@ -19,6 +19,7 @@ namespace Dino.Ui {
public string? participant_name;
bool is_highest_row = false;
+ bool is_start_row = false;
public bool controls_active { get; set; }
public bool may_show_invite_button { get; set; }
@@ -44,12 +45,14 @@ namespace Dino.Ui {
this.add_overlay(header_bar);
this.notify["controls-active"].connect(reveal_or_hide_controls);
+ this.notify["may-show-invite-button"].connect(reveal_or_hide_controls);
}
public void on_row_changed(bool is_highest, bool is_lowest, bool is_start, bool is_end) {
- is_highest_row = is_highest;
+ this.is_highest_row = is_highest;
+ this.is_start_row = is_start;
+
header_bar.show_close_button = is_highest_row;
- invite_button.visible = may_show_invite_button && is_highest_row && is_start;
if (is_highest_row) {
header_bar.get_style_context().add_class("call-header-background");
Gtk.Settings? gtk_settings = Gtk.Settings.get_default();
@@ -105,6 +108,7 @@ namespace Dino.Ui {
private void reveal_or_hide_controls() {
header_bar.opacity = controls_active ? 1.0 : 0.0;
+ invite_button.visible = may_show_invite_button && is_highest_row && is_start_row;
}
}
} \ No newline at end of file