mirror of
https://github.com/aljazceru/notedeck.git
synced 2025-12-22 02:34:20 +01:00
nav: move process nav response to own method
Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
@@ -142,16 +142,26 @@ impl RenderNavResponse {
|
||||
ctx: &mut AppContext<'_>,
|
||||
ui: &mut egui::Ui,
|
||||
) -> bool {
|
||||
let mut switching_occured: bool = false;
|
||||
let col = self.column;
|
||||
process_nav_resp(app, ctx, ui, self.response, self.column)
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(action) = self.response.response.or(self.response.title_response) {
|
||||
fn process_nav_resp(
|
||||
app: &mut Damus,
|
||||
ctx: &mut AppContext<'_>,
|
||||
ui: &mut egui::Ui,
|
||||
response: NavResponse<Option<RenderNavAction>>,
|
||||
col: usize,
|
||||
) -> bool {
|
||||
let mut switching_occured: bool = false;
|
||||
|
||||
if let Some(action) = response.response.or(response.title_response) {
|
||||
// start returning when we're finished posting
|
||||
|
||||
switching_occured = process_render_nav_action(app, ctx, ui, col, action);
|
||||
}
|
||||
|
||||
if let Some(action) = self.response.action {
|
||||
if let Some(action) = response.action {
|
||||
match action {
|
||||
NavAction::Returned => {
|
||||
let r = app
|
||||
@@ -186,7 +196,6 @@ impl RenderNavResponse {
|
||||
}
|
||||
|
||||
switching_occured
|
||||
}
|
||||
}
|
||||
|
||||
fn process_render_nav_action(
|
||||
|
||||
Reference in New Issue
Block a user