Skip to content

Commit

Permalink
Fix description destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
alainm23 committed Sep 16, 2024
1 parent c2ce4af commit 6e73662
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 19 deletions.
9 changes: 0 additions & 9 deletions .pre-commit-config.yaml

This file was deleted.

15 changes: 6 additions & 9 deletions src/Layouts/ItemSidebarView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,9 @@ public class Layouts.ItemSidebarView : Adw.Bin {
}

public void present_item (Objects.Item _item) {
disconnect_all ();
if (Services.Settings.get_default ().settings.get_boolean ("always-show-details-sidebar")) {
disconnect_all ();
}

item = _item;
update_id = Util.get_default ().generate_id ();
Expand Down Expand Up @@ -363,9 +365,7 @@ public class Layouts.ItemSidebarView : Adw.Bin {
subitems.disconnect_all ();
attachments.disconnect_all ();

if (!Services.Settings.get_default ().settings.get_boolean ("always-show-details-sidebar")) {
destroy_markdown_edit_view ();
}
destroy_markdown_edit_view ();
}

public void update_request () {
Expand Down Expand Up @@ -660,10 +660,7 @@ public class Layouts.ItemSidebarView : Adw.Bin {

private void destroy_markdown_edit_view () {
markdown_revealer.reveal_child = false;
Timeout.add (markdown_revealer.transition_duration, () => {
markdown_revealer.child = null;
markdown_edit_view = null;
return GLib.Source.REMOVE;
});
markdown_revealer.child = null;
markdown_edit_view = null;
}
}
2 changes: 1 addition & 1 deletion src/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public class MainWindow : Adw.ApplicationWindow {
item_sidebar_view.add_css_class ("sidebar");
}

var views_split_view = new Adw.OverlaySplitView () {
var views_split_view = new Adw.OverlaySplitView () {
sidebar_position = Gtk.PackType.END,
collapsed = !Services.Settings.get_default ().settings.get_boolean ("always-show-details-sidebar"),
max_sidebar_width = 375,
Expand Down

0 comments on commit 6e73662

Please sign in to comment.