Implement sheet listings with relm4 factory
This commit is contained in:
@@ -39,16 +39,16 @@ async fn main() {
|
||||
debug!("Validating sheets from database...");
|
||||
let validation_result = validate_sheet_files(sheets, &cli.directory);
|
||||
debug!("{}", validation_result.get_stats());
|
||||
for updated in validation_result.updated_sheets {
|
||||
for updated in validation_result.updated_sheets.iter() {
|
||||
database.update_sheet_path(updated).await.unwrap();
|
||||
}
|
||||
|
||||
let app = RelmApp::new("de.frajul.sheet-organizer");
|
||||
// Pass empty command line args to allow my own parsing
|
||||
app.with_args(Vec::new()).run::<AppModel>(cli.directory);
|
||||
app.with_args(Vec::new()).run::<AppModel>(validation_result);
|
||||
}
|
||||
|
||||
struct FileValidationResult {
|
||||
pub struct FileValidationResult {
|
||||
validated_sheets: Vec<Sheet>,
|
||||
invalidated_sheets: Vec<Sheet>,
|
||||
updated_sheets: Vec<Sheet>,
|
||||
|
Reference in New Issue
Block a user