[geary/wip/draft-management: 5/7] Don't clobber in-window composers on conversation count change
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/draft-management: 5/7] Don't clobber in-window composers on conversation count change
- Date: Fri, 2 Aug 2019 04:10:33 +0000 (UTC)
commit 1ddbcb8b8de6902cbe6995ea2fc48477b43eedec
Author: Michael Gratton <mike vee net>
Date: Fri Aug 2 12:02:10 2019 +1000
Don't clobber in-window composers on conversation count change
Check there aren't any open composers first before updating the main
window's UI on conversation count change.
See #170
src/client/components/main-window.vala | 37 +++++++++++++++++-----------------
1 file changed, 19 insertions(+), 18 deletions(-)
---
diff --git a/src/client/components/main-window.vala b/src/client/components/main-window.vala
index 23f00a9e..dad548f3 100644
--- a/src/client/components/main-window.vala
+++ b/src/client/components/main-window.vala
@@ -629,25 +629,26 @@ public class MainWindow : Gtk.ApplicationWindow, Geary.BaseInterface {
}
private void on_conversation_count_changed() {
- if (this.conversations.size == 0) {
- // Let the user know if there's no available conversations
- if (this.current_folder is Geary.SearchFolder) {
- this.conversation_viewer.show_empty_search();
- } else {
- this.conversation_viewer.show_empty_folder();
- }
- this.application.controller.enable_message_buttons(false);
- } else {
- // When not doing autoselect, we never get
- // conversations_selected firing from the convo list, so
- // we need to stop the loading spinner here. Only do so if
- // there isn't already a selection or a composer to avoid
- // interrupting those.
- if (!this.application.config.autoselect &&
- !this.has_composer &&
- this.conversation_list_view.get_selection().count_selected_rows() == 0) {
- this.conversation_viewer.show_none_selected();
+ // Only update the UI if we don't currently have a composer,
+ // so we don't clobber it
+ if (!this.has_composer) {
+ if (this.conversations.size == 0) {
+ // Let the user know if there's no available conversations
+ if (this.current_folder is Geary.SearchFolder) {
+ this.conversation_viewer.show_empty_search();
+ } else {
+ this.conversation_viewer.show_empty_folder();
+ }
this.application.controller.enable_message_buttons(false);
+ } else {
+ // When not doing autoselect, we never get
+ // conversations_selected firing from the convo list,
+ // so we need to stop the loading spinner here.
+ if (!this.application.config.autoselect &&
+ this.conversation_list_view.get_selection().count_selected_rows() == 0) {
+ this.conversation_viewer.show_none_selected();
+ this.application.controller.enable_message_buttons(false);
+ }
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]