Skip to content

Commit ef9729e

Browse files
committed
demo-app: Change disabling of music directory buttons
1 parent 64a752f commit ef9729e

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

demo-app/src/main.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,7 @@ fn run_app(rt: tokio::runtime::Handle, library: Library, config_dir: PathBuf) {
152152
cx,
153153
|ex| ex.emit(AppEvent::Command(AppCommand::SelectMusicDirectory)),
154154
|cx| Label::new(cx, "Select music directory..."),
155-
)
156-
.disabled(AppModel::collection_state.map(disable_select_music_dir));
155+
);
157156
Button::new(
158157
cx,
159158
|ex| ex.emit(AppEvent::Command(AppCommand::ResetMusicDirectory)),
@@ -224,11 +223,6 @@ fn run_app(rt: tokio::runtime::Handle, library: Library, config_dir: PathBuf) {
224223
.run();
225224
}
226225

227-
#[must_use]
228-
const fn disable_select_music_dir(state: &CollectionState) -> bool {
229-
state.is_pending()
230-
}
231-
232226
#[must_use]
233227
const fn disable_rescan_collection(state: &CollectionState) -> bool {
234228
!state.is_ready()

0 commit comments

Comments
 (0)