mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 17:43:32 +00:00
style: code cleanup
This commit is contained in:
parent
d690df86d8
commit
d4d7aaba2b
2 changed files with 6 additions and 6 deletions
|
|
@ -51,7 +51,7 @@ public class AlbumCatalogueAdapter extends RecyclerView.Adapter<AlbumCatalogueAd
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void publishResults(CharSequence constraint, FilterResults results) {
|
protected void publishResults(CharSequence constraint, FilterResults results) {
|
||||||
albums = (List) results.values;
|
albums = (List<AlbumID3>) results.values;
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
package com.cappielloantonio.tempo.viewmodel;
|
package com.cappielloantonio.tempo.viewmodel;
|
||||||
|
|
||||||
import android.app.Application;
|
import android.app.Application;
|
||||||
import android.util.Log;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.lifecycle.AndroidViewModel;
|
import androidx.lifecycle.AndroidViewModel;
|
||||||
|
|
@ -34,9 +33,8 @@ public class AlbumCatalogueViewModel extends AndroidViewModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadAlbums() {
|
public void loadAlbums() {
|
||||||
page = 0;
|
|
||||||
albumList.setValue(new ArrayList<>());
|
|
||||||
status = Status.RUNNING;
|
status = Status.RUNNING;
|
||||||
|
albumList.setValue(new ArrayList<>());
|
||||||
loadAlbums(500);
|
loadAlbums(500);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -63,6 +61,8 @@ public class AlbumCatalogueViewModel extends AndroidViewModel {
|
||||||
|
|
||||||
if (media.size() == size) {
|
if (media.size() == size) {
|
||||||
loadAlbums(size);
|
loadAlbums(size);
|
||||||
|
} else {
|
||||||
|
status = Status.STOPPED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, size, size * page++);
|
}, size, size * page++);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue