Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions shared/src/logseq/view_collaboration.ml
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ let notification_menu ~android source send =
];
]

let notification_screen ~bottom_spacing source send =
let notification_screen (context : Lui_ui.ui_context) ~bottom_spacing source send =
let items = Signal.map Model.notification_items source in
let current = Signal.sample source in
let show_error = Signal.map (fun (current : Model.logseq_model) -> current.push_error) source in
Expand All @@ -358,7 +358,7 @@ let notification_screen ~bottom_spacing source send =
let list_scope = Signal.map2 (fun (current : Model.logseq_model) items ->
let graph = Option.value ~default:"local" current.selected_graph_id in
[Printf.sprintf "notifications:%s:%b:%b" graph current.notifications_recent_only (items = [])]) source items in
View_base.with_reading_insets
let content = View_base.with_reading_insets
(box ~grow:1.0 [keyed ~source:list_scope ~key:Fun.id ~cmp:String.compare ~mount:(fun scope ->
let list = View_base.with_selected_signal visible
(virtual_list ~grow:1.0 ~gap:0 ~style_class:"retained-pane"
Expand Down Expand Up @@ -425,4 +425,11 @@ let notification_screen ~bottom_spacing source send =
]])) ();
box ~height:bottom_spacing [];
]) in
overlay ~grow:1.0 ~alignment:`center [list; if_ ~test:show_empty empty_state])])
overlay ~grow:1.0 ~alignment:`center [list; if_ ~test:show_empty empty_state])]) in
match Lui_ui.profile context with
| { profile_os = IOS; profile_host = SwiftUIHost } ->
(* On iOS 18.1 the inset container can intercept touches even when
the list inside it is hidden. Gate the whole pane at the stack boundary. *)
View_base.with_selected_signal visible
(box ~grow:1.0 ~style_class:"retained-pane" [content])
| _ -> content
32 changes: 18 additions & 14 deletions shared/src/logseq/view_screens.ml
Original file line number Diff line number Diff line change
Expand Up @@ -529,22 +529,26 @@ let retained_journal_pane (context : Lui_ui.ui_context) model_source send
if current.home_scroll_request = 0 then ""
else "home-top-" ^ string_of_int current.home_scroll_request) model_source)
else None in
let visible =
Signal.map
(fun (current : Model.logseq_model) ->
View_base.journal_home_visible_
{ current with
Model.node_routes = [];
app_navigation_path = [];
search_open = false;
search_navigation_path = [];
})
model_source in
let content =
root_outliner_view ?scroll_to_top context
(Signal.map View_base.journal_navigation_model model_source)
(Signal.map
(fun (current : Model.logseq_model) ->
View_base.journal_home_visible_
{ current with
Model.node_routes = [];
app_navigation_path = [];
search_open = false;
search_navigation_path = [];
})
model_source)
send
in
box ~grow:1.0 ~accessibility_identifier:"pane.journals" [content]
visible send in
let ios = uses_ios_native_header context in
let pane = box ~grow:1.0 ~accessibility_identifier:"pane.journals"
?style_class:(if ios then Some "retained-pane" else None) [content] in
(* The retained Home pane sits above the selected page in the SwiftUI stack. *)
if ios then View_base.with_selected_signal visible pane else pane

let journal_tree_panes (context : Lui_ui.ui_context) model_source send : t
=
Expand Down Expand Up @@ -617,7 +621,7 @@ let logseq_main_view (context : Lui_ui.ui_context) model_source send : t
~uses_header:(uses_ios_native_header context || Lui_ui.host context = KotlinHost)
~bottom_spacing:(if uses_ios_native_header context then 64 else 88)
shell_model send);
View_collaboration.notification_screen
View_collaboration.notification_screen context
~bottom_spacing:(if uses_ios_native_header context then 72 else 80) shell_model send;
if_
~test:(Signal.map View_base.graphs_destination_ shell_model)
Expand Down
Loading