mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-29 08:21:47 +00:00
settings: define 'inertial_scrolling' setting (default true)
This commit is contained in:
parent
15c4e572d4
commit
e5463a1d72
@ -86,6 +86,7 @@ pub struct Settings {
|
||||
pub posting_area_at_top: bool,
|
||||
pub status_bar: bool,
|
||||
pub image_resize_algorithm: String,
|
||||
pub inertial_scrolling: bool,
|
||||
|
||||
// Staletime settings
|
||||
pub relay_list_becomes_stale_hours: u64,
|
||||
@ -157,6 +158,7 @@ impl Default for Settings {
|
||||
posting_area_at_top: default_setting!(posting_area_at_top),
|
||||
status_bar: default_setting!(status_bar),
|
||||
image_resize_algorithm: default_setting!(image_resize_algorithm),
|
||||
inertial_scrolling: default_setting!(inertial_scrolling),
|
||||
relay_list_becomes_stale_hours: default_setting!(relay_list_becomes_stale_hours),
|
||||
metadata_becomes_stale_hours: default_setting!(metadata_becomes_stale_hours),
|
||||
nip05_becomes_stale_if_valid_hours: default_setting!(
|
||||
@ -232,6 +234,7 @@ impl Settings {
|
||||
posting_area_at_top: load_setting!(posting_area_at_top),
|
||||
status_bar: load_setting!(status_bar),
|
||||
image_resize_algorithm: load_setting!(image_resize_algorithm),
|
||||
inertial_scrolling: load_setting!(inertial_scrolling),
|
||||
relay_list_becomes_stale_hours: load_setting!(relay_list_becomes_stale_hours),
|
||||
metadata_becomes_stale_hours: load_setting!(metadata_becomes_stale_hours),
|
||||
nip05_becomes_stale_if_valid_hours: load_setting!(nip05_becomes_stale_if_valid_hours),
|
||||
@ -303,6 +306,7 @@ impl Settings {
|
||||
save_setting!(posting_area_at_top, self, txn);
|
||||
save_setting!(status_bar, self, txn);
|
||||
save_setting!(image_resize_algorithm, self, txn);
|
||||
save_setting!(inertial_scrolling, self, txn);
|
||||
save_setting!(relay_list_becomes_stale_hours, self, txn);
|
||||
save_setting!(metadata_becomes_stale_hours, self, txn);
|
||||
save_setting!(nip05_becomes_stale_if_valid_hours, self, txn);
|
||||
|
@ -671,6 +671,7 @@ impl Storage {
|
||||
String,
|
||||
"CatmullRom".to_owned()
|
||||
);
|
||||
def_setting!(inertial_scrolling, b"inertial_scrolling", bool, true);
|
||||
def_setting!(
|
||||
relay_list_becomes_stale_hours,
|
||||
b"relay_list_becomes_stale_hours",
|
||||
|
@ -75,4 +75,7 @@ pub(super) fn update(app: &mut GossipUi, ctx: &Context, _frame: &mut eframe::Fra
|
||||
&mut app.settings.status_bar,
|
||||
"Show DEBUG statistics in sidebar",
|
||||
);
|
||||
|
||||
ui.add_space(20.0);
|
||||
ui.checkbox(&mut app.settings.inertial_scrolling, "Inertial Scrolling");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user