blob: 3f90acebb4c39e66092b14db1f4bcf8a268ac572 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
package it.niedermann.nextcloud.deck.ui.widget.filter;
import android.app.Application;
import androidx.annotation.NonNull;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import it.niedermann.nextcloud.deck.api.IResponseCallback;
import it.niedermann.nextcloud.deck.model.widget.filter.FilterWidget;
import it.niedermann.nextcloud.deck.ui.viewmodel.BaseViewModel;
public class FilterWidgetViewModel extends BaseViewModel {
@NonNull
private final MutableLiveData<FilterWidget> config$ = new MutableLiveData<>(new FilterWidget());
public FilterWidgetViewModel(@NonNull Application application) {
super(application);
}
public LiveData<FilterWidget> getFilterWidgetConfiguration() {
return this.config$;
}
public void updateFilterWidget(@NonNull IResponseCallback<Integer> callback) {
baseRepository.createFilterWidget(config$.getValue(), callback);
}
}
|