aboutsummaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2022-11-26 22:26:25 +0100
committerfiaxh <git@lightrise.org>2022-12-30 21:34:40 +0100
commit4d7809bb12199a598b531ca3ca019a4bb5a867f7 (patch)
tree1ac50603a78dd5c78bf2fcd7c99a2c3f242c0005 /main
parent799d09a4c98d1a00790f261600d3f4d813140954 (diff)
downloaddino-4d7809bb12199a598b531ca3ca019a4bb5a867f7.tar.gz
dino-4d7809bb12199a598b531ca3ca019a4bb5a867f7.zip
Fix compiler warnings
Diffstat (limited to 'main')
-rw-r--r--main/src/ui/chat_input/encryption_button.vala1
-rw-r--r--main/src/ui/conversation_content_view/conversation_item_skeleton.vala3
-rw-r--r--main/src/ui/conversation_content_view/conversation_view.vala2
-rw-r--r--main/src/ui/conversation_content_view/file_image_widget.vala1
-rw-r--r--main/src/ui/conversation_view.vala18
-rw-r--r--main/src/ui/conversation_view_controller.vala7
6 files changed, 7 insertions, 25 deletions
diff --git a/main/src/ui/chat_input/encryption_button.vala b/main/src/ui/chat_input/encryption_button.vala
index 50497ee3..1f991338 100644
--- a/main/src/ui/chat_input/encryption_button.vala
+++ b/main/src/ui/chat_input/encryption_button.vala
@@ -11,7 +11,6 @@ public class EncryptionButton {
private MenuButton menu_button;
private Conversation? conversation;
- private CheckButton? button_unencrypted;
private string? current_icon;
private StreamInteractor stream_interactor;
private SimpleAction action;
diff --git a/main/src/ui/conversation_content_view/conversation_item_skeleton.vala b/main/src/ui/conversation_content_view/conversation_item_skeleton.vala
index 21aca876..7113b3b7 100644
--- a/main/src/ui/conversation_content_view/conversation_item_skeleton.vala
+++ b/main/src/ui/conversation_content_view/conversation_item_skeleton.vala
@@ -43,6 +43,9 @@ public class ConversationItemSkeleton : Plugins.ConversationItemWidgetInterface,
this.item = item;
this.content_meta_item = item as ContentMetaItem;
+ item.bind_property("in-edit-mode", this, "item-in-edit-mode");
+ this.notify["item-in-edit-mode"].connect(update_edit_mode);
+
Builder builder = new Builder.from_resource("/im/dino/Dino/conversation_item_widget.ui");
main_grid = (Grid) builder.get_object("main_grid");
main_grid.add_css_class("message-box");
diff --git a/main/src/ui/conversation_content_view/conversation_view.vala b/main/src/ui/conversation_content_view/conversation_view.vala
index caeee09a..f0f6e118 100644
--- a/main/src/ui/conversation_content_view/conversation_view.vala
+++ b/main/src/ui/conversation_content_view/conversation_view.vala
@@ -136,7 +136,6 @@ public class ConversationView : Widget, Plugins.ConversationItemCollection, Plug
// Get widget under pointer
int h = 0;
Widget? w = null;
- Plugins.MetaConversationItem? meta_item = null;
foreach (Plugins.MetaConversationItem item in meta_items) {
Widget widget = widgets[item];
h += widget.get_allocated_height() + widget.margin_top + widget.margin_bottom;
@@ -404,7 +403,6 @@ public class ConversationView : Widget, Plugins.ConversationItemCollection, Plug
if (lower_item != null) {
if (can_merge(item, lower_item)) {
- ConversationItemSkeleton lower_skeleton = item_item_skeletons[lower_item];
item_skeleton.show_skeleton = false;
} else {
item_skeleton.show_skeleton = true;
diff --git a/main/src/ui/conversation_content_view/file_image_widget.vala b/main/src/ui/conversation_content_view/file_image_widget.vala
index 285e397e..097ac695 100644
--- a/main/src/ui/conversation_content_view/file_image_widget.vala
+++ b/main/src/ui/conversation_content_view/file_image_widget.vala
@@ -35,7 +35,6 @@ public class FileImageWidget : Box {
pixbuf = pixbuf.apply_embedded_orientation();
image.load(pixbuf);
- Picture picture = new Picture.for_pixbuf(pixbuf) { can_shrink=true, keep_aspect_ratio=true, halign=Align.START };
Idle.add(load_from_file.callback);
return image;
diff --git a/main/src/ui/conversation_view.vala b/main/src/ui/conversation_view.vala
index 7c93c4ff..128b3bd8 100644
--- a/main/src/ui/conversation_view.vala
+++ b/main/src/ui/conversation_view.vala
@@ -28,9 +28,6 @@ public class ConversationView : Widget {
// conversation_scrolled.set_child(list_view);
// list_view.set_factory(get_item_factory());
-// conversation_scrolled.vadjustment.notify["upper"].connect_after(on_upper_notify);
-// conversation_scrolled.vadjustment.notify["value"].connect(on_value_notify);
-
}
public void add_overlay_dialog(Widget widget) {
@@ -54,21 +51,6 @@ public class ConversationView : Widget {
white_revealer.visible = false;
}
}
-
- private void on_upper_notify() {
- print("on_upper_notify\n");
- if (at_current_content) {
- print("on_upper_notify2\n");
- // scroll down
-// conversation_scrolled.vadjustment.value = conversation_scrolled.vadjustment.upper - conversation_scrolled.vadjustment.page_size;
-// conversation_scrolled.scroll_child(ScrollType.END, false);
- }
- }
-
- private void on_value_notify() {
- print("on_value_notify\n");
-// at_current_content = false;
- }
}
}
diff --git a/main/src/ui/conversation_view_controller.vala b/main/src/ui/conversation_view_controller.vala
index 5844ef0a..da94b740 100644
--- a/main/src/ui/conversation_view_controller.vala
+++ b/main/src/ui/conversation_view_controller.vala
@@ -146,7 +146,7 @@ public class ConversationViewController : Object {
view.conversation_frame.initialize_for_conversation(conversation);
}
- update_file_upload_status();
+ update_file_upload_status.begin();
}
public void unset_conversation() {
@@ -159,6 +159,7 @@ public class ConversationViewController : Object {
bool upload_available = yield stream_interactor.get_module(FileManager.IDENTITY).is_upload_available(conversation);
chat_input_controller.set_file_upload_active(upload_available);
+
if (upload_available && overlay_dialog == null) {
if (drop_event_controller.widget == null) {
view.add_controller(drop_event_controller);
@@ -246,13 +247,13 @@ public class ConversationViewController : Object {
overlay.close.connect(() => {
// We don't want drag'n'drop to be active while the overlay is active
overlay_dialog = null;
- update_file_upload_status();
+ update_file_upload_status.begin();
});
view.add_overlay_dialog(overlay.get_widget());
overlay_dialog = overlay.get_widget();
- update_file_upload_status();
+ update_file_upload_status.begin();
}
private void send_file(File file) {