Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 64d7394ffa | |||
| 69892a4d08 |
3
gtk/dist/rpm/kordophone.spec
vendored
3
gtk/dist/rpm/kordophone.spec
vendored
@@ -1,6 +1,5 @@
|
||||
%global app_version %{!?app_version:1.3.0}
|
||||
Name: kordophone
|
||||
Version: %{app_version}
|
||||
Version: %{?app_version}%{!?app_version:1.3.0}
|
||||
Release: 1%{?dist}
|
||||
Summary: GTK4/Libadwaita client for Kordophone
|
||||
|
||||
|
||||
@@ -327,8 +327,8 @@ private class TranscriptDrawingArea : Widget
|
||||
|
||||
private void recompute_message_layouts() {
|
||||
var container_width = get_width();
|
||||
float max_width = container_width * 0.90f;
|
||||
float image_max_width = max_width * 0.75f;
|
||||
float max_width = container_width * 0.80f;
|
||||
float image_max_width = max_width * 0.70f;
|
||||
|
||||
DateTime? last_date = null;
|
||||
string? last_sender = null;
|
||||
|
||||
@@ -159,7 +159,6 @@ public class TranscriptView : Adw.Bin
|
||||
}
|
||||
|
||||
delegate void OpenPath(string path);
|
||||
private ulong attachment_downloaded_handler_id = 0;
|
||||
private void open_attachment(string attachment_guid) {
|
||||
OpenPath open_path = (path) => {
|
||||
try {
|
||||
@@ -180,10 +179,17 @@ public class TranscriptView : Adw.Bin
|
||||
|
||||
// TODO: Should probably indicate progress here.
|
||||
|
||||
attachment_downloaded_handler_id = Repository.get_instance().attachment_downloaded.connect((guid) => {
|
||||
ulong handler_id = 0;
|
||||
handler_id = Repository.get_instance().attachment_downloaded.connect((guid) => {
|
||||
if (guid == attachment_guid) {
|
||||
open_path(attachment_info.path);
|
||||
Repository.get_instance().disconnect(attachment_downloaded_handler_id);
|
||||
try {
|
||||
var updated_attachment_info = Repository.get_instance().get_attachment_info(attachment_guid);
|
||||
open_path(updated_attachment_info.path);
|
||||
} catch (GLib.Error e) {
|
||||
warning("Failed to get attachment info after download: %s", e.message);
|
||||
}
|
||||
|
||||
Repository.get_instance().disconnect(handler_id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user