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
|
||||
protected void publishResults(CharSequence constraint, FilterResults results) {
|
||||
albums = (List) results.values;
|
||||
albums = (List<AlbumID3>) results.values;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
};
|
||||
|
|
@ -165,4 +165,4 @@ public class AlbumCatalogueAdapter extends RecyclerView.Adapter<AlbumCatalogueAd
|
|||
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
package com.cappielloantonio.tempo.viewmodel;
|
||||
|
||||
import android.app.Application;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.lifecycle.AndroidViewModel;
|
||||
|
|
@ -34,9 +33,8 @@ public class AlbumCatalogueViewModel extends AndroidViewModel {
|
|||
}
|
||||
|
||||
public void loadAlbums() {
|
||||
page = 0;
|
||||
albumList.setValue(new ArrayList<>());
|
||||
status = Status.RUNNING;
|
||||
albumList.setValue(new ArrayList<>());
|
||||
loadAlbums(500);
|
||||
}
|
||||
|
||||
|
|
@ -63,6 +61,8 @@ public class AlbumCatalogueViewModel extends AndroidViewModel {
|
|||
|
||||
if (media.size() == size) {
|
||||
loadAlbums(size);
|
||||
} else {
|
||||
status = Status.STOPPED;
|
||||
}
|
||||
}
|
||||
}, size, size * page++);
|
||||
|
|
@ -93,4 +93,4 @@ public class AlbumCatalogueViewModel extends AndroidViewModel {
|
|||
RUNNING,
|
||||
STOPPED
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue