aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/src/main/java/xyz/adjutor/aniki/presentation/view/manga/TopMangaPage.kt20
1 files changed, 15 insertions, 5 deletions
diff --git a/app/src/main/java/xyz/adjutor/aniki/presentation/view/manga/TopMangaPage.kt b/app/src/main/java/xyz/adjutor/aniki/presentation/view/manga/TopMangaPage.kt
index edb5fea..943019d 100644
--- a/app/src/main/java/xyz/adjutor/aniki/presentation/view/manga/TopMangaPage.kt
+++ b/app/src/main/java/xyz/adjutor/aniki/presentation/view/manga/TopMangaPage.kt
@@ -23,19 +23,21 @@ import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
import xyz.adjutor.aniki.R
import xyz.adjutor.aniki.data.manga.TopMangaApi
+import xyz.adjutor.aniki.presentation.controller.TopMangaController
import xyz.adjutor.aniki.presentation.model.manga.TopManga
import xyz.adjutor.aniki.presentation.model.manga.TopMangaResponse
import java.lang.reflect.Type
+import kotlin.properties.Delegates
//view
class TopMangaPage : Fragment() {
+ lateinit var controller: TopMangaController
+
private lateinit var sharedPreferences: SharedPreferences
- val gson: Gson = GsonBuilder()
- .setLenient()
- .create()
- private var baseUrl = "https://api.jikan.moe/" //the api's base url
- var page: Int = 1
+ lateinit var gson: Gson
+ private lateinit var baseUrl: String //the api's base url
+ private var page by Delegates.notNull<Int>()
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
@@ -44,6 +46,14 @@ class TopMangaPage : Fragment() {
// Inflate the layout for this fragment
val view = inflater.inflate(R.layout.top_manga_page, container, false)
+ //controller.onStart()
+
+ gson = GsonBuilder()
+ .setLenient()
+ .create()
+ baseUrl = "https://api.jikan.moe/" //the api's base url
+ page = 1
+
sharedPreferences = view.context.getSharedPreferences("sp_manga", Context.MODE_PRIVATE)
val mangaList: List<TopManga>? = getDataFromCache()
Finishing album and starting playlistsClyhtsuriva3-16/+102 2020-12-23Implementing AlbumClyhtsuriva3-17/+155 Adding list, extract and save support to albums as well as addAlbum for the albums. Starting the method to add songs to an album as well. 2020-12-22SimplifyingClyhtsuriva2-129/+81 I'm creating methods in jMusicHub to simplify the work I'l will be doing to add Albums and Playlists commands such as list, extract and save. 2020-12-19Adding AudioBooksClyhtsuriva7-48/+225 Finishing AudioBook class, adding list and save for the audiobooks. Adding extract method for both audiobooks and songs. Resolving the id incremention issue. 2020-12-11(De)Serialization of the songsClyhtsuriva2-42/+63 Serialization and Deser now work fine for the songs. We're able to store arrays. 2020-12-11Getting serialization working with a songClyhtsuriva3-7/+36 2020-12-11adding Serialization interface and methodsClyhtsuriva6-59/+63 2020-12-07Big updateMasfehico6-16/+99 Implementing the function to add songs. Cleaning a bit everywhere as well. 2020-12-07cleaning and adding stuff in playlistMasfehico3-2/+20 2020-12-07Updating song and audiobook accordingly to the last commitMasfehico2-8/+8 2020-12-07Adding the enum classesMasfehico3-0/+9 2020-12-07Updating song, audiobook and musical elements's sets and getsMasfehico3-5/+23 2020-12-07Finishing MusicalElement.javaMasfehico1-6/+11 2020-11-23Cleaning upMasfehico2-30/+0 2020-11-23Deleting the CSVSMasfehico5-3669/+0 2020-11-23Minor testing changesMasfehico7-43/+63 2020-11-23Musical elements updated and jMusicHub basic creationMasfehico2-0/+0 2020-11-23Musical elements updated and jMusicHub basic creationMasfehico4-3/+74 2020-11-21README.md updatedMasfehico1-3/+1 2020-11-19Started Song and MusicalElementMasfehico5-0/+190 2020-11-18Added CSVsMasfehico9-102/+3756 I added some csvs by exracting my ampache mysql DB. Also started to write on the README file already. 2020-11-18Firs filesMasfehico8-0/+103 Pushing the empty java files I'll be using with some csvs. 2020-11-17LICENSE updatedMasfehico1-68/+81