feat(settings): allow sorting thread replies newest first

This commit is contained in:
Fernando López Guevara
2025-07-29 21:30:35 -03:00
parent 40764d7368
commit f2153f53dc
7 changed files with 154 additions and 97 deletions

View File

@@ -21,7 +21,7 @@ use crate::{
note::{custom_zap::CustomZapView, NewPostAction, PostAction, PostType, QuoteRepostView},
profile::EditProfileView,
search::{FocusState, SearchView},
settings::{SettingsAction, ShowSourceClientOption},
settings::SettingsAction,
support::SupportView,
wallet::{get_default_zap_state, WalletAction, WalletState, WalletView},
AccountsView, PostReplyView, PostView, ProfileView, RelayView, SettingsView, ThreadView,
@@ -586,26 +586,11 @@ fn render_nav_body(
.map(RenderNavAction::RelayAction),
Route::Settings => {
let mut show_note_client: ShowSourceClientOption = app.note_options.into();
let mut settings = ctx.settings_handler.get_settings_mut();
let mut theme: String = (if ui.visuals().dark_mode {
"Dark"
} else {
"Light"
})
.into();
let mut selected_language: String = ctx.i18n.get_current_locale().to_string();
SettingsView::new(
ctx.img_cache,
&mut selected_language,
&mut theme,
&mut show_note_client,
ctx.i18n,
)
.ui(ui)
.map(RenderNavAction::SettingsAction)
SettingsView::new(ctx.i18n, ctx.img_cache, &mut settings)
.ui(ui)
.map(RenderNavAction::SettingsAction)
}
Route::Reply(id) => {
let txn = if let Ok(txn) = Transaction::new(ctx.ndb) {