Clean up code

This commit is contained in:
2024-05-26 12:12:33 +02:00
parent 35a47704db
commit 48f789ca83
4 changed files with 14 additions and 17 deletions

View File

@@ -1,6 +1,6 @@
use gtk::prelude::*;
use relm4::factory::{FactoryVecDeque, Position};
use relm4::factory::FactoryVecDeque;
use relm4::RelmListBoxExt;
use relm4::{gtk, ComponentParts, ComponentSender, SimpleComponent};
@@ -85,18 +85,18 @@ impl SimpleComponent for SheetListingModel {
}
SheetListingInput::Sort => {
sort_sheets(&mut self.sheets);
sender.output(SheetListingOutput::ContentsChanged);
sender.output(SheetListingOutput::ContentsChanged).unwrap();
}
SheetListingInput::Shuffle => {
shuffle_sheets(&mut self.sheets);
sender.output(SheetListingOutput::ContentsChanged);
sender.output(SheetListingOutput::ContentsChanged).unwrap();
}
SheetListingInput::ReloadSheets(sheets) => {
self.sheets.guard().clear();
for sheet_model_type in sheets {
self.sheets.guard().push_back(sheet_model_type);
}
sender.output(SheetListingOutput::ContentsChanged);
sender.output(SheetListingOutput::ContentsChanged).unwrap();
}
SheetListingInput::None => {}
}