File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323 (.add_child v)
2424 (.set_visible_child v))
2525 (-> s
26+ (assoc :header-start nil )
27+ (assoc :header-end nil )
2628 (assoc :prev-state s)
2729 (assoc :curr-view v))))
2830(defn push-titled-view [s view title]
5254 (stories-list-view (partial lobster/domain-stories payload))
5355 payload)
5456 :push-story
55- (push-titled-view state (comments/comments-view payload) " Comments" )
57+ (-> state
58+ (push-titled-view (comments/comments-view payload) " Comments" )
59+ (assoc :header-end
60+ [Gtk/LinkButton
61+ :uri (lobster/rel " s/" (:short_id payload))
62+ :icon-name " web-browser-symbolic"
63+ :css_classes #js [" image-button" ]]))
5664 :push-tagged-stories
5765 (push-titled-view state
5866 (stories-list-view (partial lobster/tagged payload))
6674 (assoc :prev-state (get-in state [:prev-state :prev-state ]))
6775 (assoc :curr-view (:curr-view (:prev-state state)))
6876 (assoc :title-widget (:title-widget (:prev-state state)))
69- (assoc :header-start (if (get-in state [:prev-state :prev-state ]) back-btn nil )))))
77+ (assoc :header-start (get-in state [:prev-state :header-start ]))
78+ (assoc :header-end (get-in state [:prev-state :header-end ])))))
79+
7080 (f action)))))
7181(state/add-transducer app-transducer)
7282
Original file line number Diff line number Diff line change 77
88(declare header-bar )
99(defc header-bar []
10- (let [header-start (derived-atom [state/state] :header-start #(get % :header-start nil ))]
11- [Adw/HeaderBar
12- :.pack_start [Adw/Bin :child header-start]
13- :title_widget (derived-atom
14- [state/state] :title-widget #(get % :title-widget nil ))]))
10+
11+ [Adw/HeaderBar
12+ :.pack_start [Adw/Bin :child
13+ (derived-atom [state/state]
14+ :header-start #(get % :header-start nil ))]
15+ :.pack_end [Adw/Bin :child
16+ (derived-atom [state/state]
17+ :header-end #(get % :header-end nil ))]
18+ :title_widget (derived-atom
19+ [state/state] :title-widget #(get % :title-widget nil ))])
1520
1621(defn window-content []
1722 [Gtk/Box
You can’t perform that action at this time.
0 commit comments