@@ -200,12 +200,6 @@ fn run_app(rt: tokio::runtime::Handle, library: Library, config_dir: PathBuf) {
200
200
|cx : & mut Context | Label :: new ( cx, "Rescan collection" ) ,
201
201
)
202
202
. disabled ( AppModel :: collection_state. map ( disable_rescan_collection) ) ;
203
- Button :: new (
204
- cx,
205
- |ex| ex. emit ( AppEvent :: Command ( AppCommand :: ResetCollection ) ) ,
206
- |cx| Label :: new ( cx, "Reset collection" ) ,
207
- )
208
- . disabled ( AppModel :: collection_state. map ( disable_rescan_collection) ) ;
209
203
} ) ;
210
204
} ) ;
211
205
@@ -235,11 +229,6 @@ const fn disable_select_music_dir(state: &CollectionState) -> bool {
235
229
state. is_pending ( )
236
230
}
237
231
238
- #[ must_use]
239
- fn disable_reset_collection ( state : & CollectionState ) -> bool {
240
- state. is_pending ( ) || * state == CollectionState :: Void
241
- }
242
-
243
232
#[ must_use]
244
233
const fn disable_rescan_collection ( state : & CollectionState ) -> bool {
245
234
!state. is_ready ( )
@@ -293,7 +282,6 @@ enum AppCommand {
293
282
SelectMusicDirectory ,
294
283
UpdateMusicDirectory ( DirPath < ' static > ) ,
295
284
ResetMusicDirectory ,
296
- ResetCollection ,
297
285
RescanCollection ,
298
286
SearchTracks ( String ) ,
299
287
}
@@ -393,9 +381,6 @@ impl Model for AppModel {
393
381
AppCommand :: ResetMusicDirectory => {
394
382
self . app . library . reset_music_dir ( ) ;
395
383
}
396
- AppCommand :: ResetCollection => {
397
- self . app . library . reset_collection ( ) ;
398
- }
399
384
AppCommand :: RescanCollection => {
400
385
self . app . library . spawn_rescan_collection_task ( & self . app . rt ) ;
401
386
}
0 commit comments