mirror of
https://github.com/CappielloAntonio/tempo.git
synced 2026-02-03 07:53:37 +00:00
style: code cleanup
This commit is contained in:
@@ -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++);
|
||||||
|
|||||||
Reference in New Issue
Block a user