From e79bf68553676c9be09f4616aadcd522149c506e Mon Sep 17 00:00:00 2001 From: Clyhtsuriva Date: Mon, 22 Feb 2021 19:51:27 +0100 Subject: Detail is now working for animes --- app/src/main/java/xyz/adjutor/aniki/topanime/TopAnimePage.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/src/main/java/xyz/adjutor/aniki/topanime/TopAnimePage.kt') 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? = getDataFromCache() if(animeList != null ){ @@ -94,9 +94,9 @@ class TopAnimePage : Fragment() { override fun onResponse(call: Call, response: Response) { 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 = 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 -- cgit v1.2.3