Fix drag and drop uploading
This commit is contained in:
parent
21ab48e09a
commit
85342ee2eb
|
@ -55,12 +55,6 @@ public class ConversationView : Widget {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void dispose() {
|
|
||||||
// To prevent a warning when closing Dino
|
|
||||||
// "Can't set a target list on a widget until you've called gtk_drag_dest_set() to make the widget into a drag destination"
|
|
||||||
// Gtk.drag_dest_unset(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void on_upper_notify() {
|
private void on_upper_notify() {
|
||||||
print("on_upper_notify\n");
|
print("on_upper_notify\n");
|
||||||
if (at_current_content) {
|
if (at_current_content) {
|
||||||
|
|
|
@ -154,20 +154,20 @@ public class ConversationViewController : Object {
|
||||||
conversation_topic = null;
|
conversation_topic = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void update_file_upload_status() {
|
private async void update_file_upload_status() {
|
||||||
stream_interactor.get_module(FileManager.IDENTITY).is_upload_available.begin(conversation, (_, res) => {
|
if (conversation == null) return;
|
||||||
bool upload_available = stream_interactor.get_module(FileManager.IDENTITY).is_upload_available.end(res);
|
|
||||||
chat_input_controller.set_file_upload_active(upload_available);
|
bool upload_available = yield stream_interactor.get_module(FileManager.IDENTITY).is_upload_available(conversation);
|
||||||
if (conversation.account.bare_jid.to_string().has_prefix("f")) {
|
chat_input_controller.set_file_upload_active(upload_available);
|
||||||
if (drop_event_controller.widget == null) {
|
if (upload_available && overlay_dialog == null) {
|
||||||
view.add_controller(drop_event_controller);
|
if (drop_event_controller.widget == null) {
|
||||||
}
|
view.add_controller(drop_event_controller);
|
||||||
} else {
|
|
||||||
if (drop_event_controller.widget != null) {
|
|
||||||
view.remove_controller(drop_event_controller);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
} else {
|
||||||
|
if (drop_event_controller.widget != null) {
|
||||||
|
view.remove_controller(drop_event_controller);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void update_conversation_display_name() {
|
private void update_conversation_display_name() {
|
||||||
|
|
Loading…
Reference in a new issue