aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/xyz/adjutor/aniki/topanime/TopAnimePage.kt
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/xyz/adjutor/aniki/topanime/TopAnimePage.kt')
-rw-r--r--app/src/main/java/xyz/adjutor/aniki/topanime/TopAnimePage.kt6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/src/main/java/xyz/adjutor/aniki/topanime/TopAnimePage.kt b/app/src/main/java/xyz/adjutor/aniki/topanime/TopAnimePage.kt
index 53dca8a..f2d5e4c 100644
--- a/app/src/main/java/xyz/adjutor/aniki/topanime/TopAnimePage.kt
+++ b/app/src/main/java/xyz/adjutor/aniki/topanime/TopAnimePage.kt
@@ -37,7 +37,7 @@ class TopAnimePage : Fragment() {
// Inflate the layout for this fragment
val view = inflater.inflate(R.layout.top_anime_page, container, false)
- sharedPreferences = view.context.getSharedPreferences("app_aniki", Context.MODE_PRIVATE)
+ sharedPreferences = view.context.getSharedPreferences("sp_anime", Context.MODE_PRIVATE)
val animeList: List<TopAnime>? = getDataFromCache()
if(animeList != null ){
@@ -94,9 +94,9 @@ class TopAnimePage : Fragment() {
override fun onResponse(call: Call<RestTopAnimeResponse>, response: Response<RestTopAnimeResponse>) {
if(response.isSuccessful && response.body() != null){ //if the code returned is >= 200 and < 300 AND the the body ain't empty
- val animeList = response.body()!!.getResults() //getting the "top" field containing our list of TopAnimes
+ val animeList: List<TopAnime> = response.body()!!.getResults() //getting the "top" field containing our list of TopAnimes
saveList(animeList)
- showList(view, animeList) // calling the method in charge of displaying on the recyclerview
+ showList(view, animeList) //calling the method in charge of displaying on the recyclerview
} else {
showError() //a snackbar