mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 01:53:31 +00:00
build: change of package name
This commit is contained in:
parent
49afdbe4eb
commit
b76a38cb30
274 changed files with 1981 additions and 2161 deletions
|
|
@ -0,0 +1,37 @@
|
|||
package com.cappielloantonio.tempo.viewmodel;
|
||||
|
||||
import android.app.Application;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.lifecycle.AndroidViewModel;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
|
||||
import com.cappielloantonio.tempo.repository.DirectoryRepository;
|
||||
import com.cappielloantonio.tempo.subsonic.models.Indexes;
|
||||
import com.cappielloantonio.tempo.subsonic.models.MusicFolder;
|
||||
|
||||
public class IndexViewModel extends AndroidViewModel {
|
||||
private final DirectoryRepository directoryRepository;
|
||||
|
||||
private MusicFolder musicFolder;
|
||||
|
||||
private MutableLiveData<Indexes> indexes = new MutableLiveData<>(null);
|
||||
|
||||
public IndexViewModel(@NonNull Application application) {
|
||||
super(application);
|
||||
|
||||
directoryRepository = new DirectoryRepository();
|
||||
}
|
||||
|
||||
public MutableLiveData<Indexes> getIndexes() {
|
||||
return directoryRepository.getIndexes(null, null);
|
||||
}
|
||||
|
||||
public String getMusicFolderName() {
|
||||
return musicFolder != null ? musicFolder.getName() : "";
|
||||
}
|
||||
|
||||
public void setMusicFolder(MusicFolder musicFolder) {
|
||||
this.musicFolder = musicFolder;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue