Skip to content

Selecting where to save app #2

@willser

Description

@willser

egui use directories_next store data.This is docs about directories_next.
One way to app could selecting where to save data is following this issue emilk/egui#914 .

Other way is rewrite following code

weaver/src/main.rs

Lines 134 to 147 in 9e097f3

fn setup(
&mut self,
ctx: &egui::Context,
_frame: &epi::Frame,
storage: Option<&dyn epi::Storage>,
) {
// Load previous app state (if any).
if let Some(storage) = storage {
// TODO change key in feature
*self = epi::get_value(storage, epi::APP_KEY).unwrap_or_default();
}
// Init font after load data from local
self.settings.local_settings(ctx);
}

It is worth noting that those code just work in write data to hd.

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedBlocked by somethingenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions