chore: execute lint inspection

address issues from lint inspection
convert string literals to resources
merge extension & download type
This commit is contained in:
TwistedUmbrellaX
2024-03-10 20:26:57 -04:00
parent d4ab0ad57d
commit b469322e50
177 changed files with 1741 additions and 2271 deletions

View File

@@ -20,6 +20,7 @@ import ani.dantotsu.profile.ChartBuilder.Companion.StatType
import ani.dantotsu.statusBarHeight
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartType
import com.xwray.groupie.GroupieAdapter
import eu.kanade.tachiyomi.util.system.getSerializableCompat
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
@@ -48,7 +49,7 @@ class StatsFragment :
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
activity = requireActivity() as ProfileActivity
user = arguments?.getSerializable("user") as Query.UserProfile
user = arguments?.getSerializableCompat<Query.UserProfile>("user") as Query.UserProfile
binding.statisticList.adapter = adapter
binding.statisticList.setHasFixedSize(true)
@@ -95,7 +96,7 @@ class StatsFragment :
}
} else {
stats.removeAll(
stats.filter { it?.id == Anilist.userid }
stats.filter { it?.id == Anilist.userid }.toSet()
)
loadStats(type == MediaType.ANIME)
}
@@ -439,6 +440,7 @@ class StatsFragment :
}.toMutableList()
chartPackets.clear()
chartPackets.addAll(standardizedPackets)
@Suppress("UNCHECKED_CAST")
val genreChart = ChartBuilder.buildChart(
activity,
ChartType.TwoDimensional,
@@ -493,6 +495,7 @@ class StatsFragment :
}.toMutableList()
chartPackets.clear()
chartPackets.addAll(standardizedPackets)
@Suppress("UNCHECKED_CAST")
val tagChart = ChartBuilder.buildChart(
activity,
ChartType.TwoDimensional,
@@ -547,6 +550,7 @@ class StatsFragment :
}.toMutableList()
chartPackets.clear()
chartPackets.addAll(standardizedPackets)
@Suppress("UNCHECKED_CAST")
val countryChart = ChartBuilder.buildChart(
activity,
ChartType.OneDimensional,
@@ -603,6 +607,7 @@ class StatsFragment :
}.toMutableList()
chartPackets.clear()
chartPackets.addAll(standardizedPackets)
@Suppress("UNCHECKED_CAST")
val voiceActorsChart = ChartBuilder.buildChart(
activity,
ChartType.TwoDimensional,
@@ -657,6 +662,7 @@ class StatsFragment :
}.toMutableList()
chartPackets.clear()
chartPackets.addAll(standardizedPackets)
@Suppress("UNCHECKED_CAST")
val studioChart = ChartBuilder.buildChart(
activity,
ChartType.TwoDimensional,
@@ -714,6 +720,7 @@ class StatsFragment :
}.toMutableList()
chartPackets.clear()
chartPackets.addAll(standardizedPackets)
@Suppress("UNCHECKED_CAST")
val staffChart = ChartBuilder.buildChart(
activity,
ChartType.TwoDimensional,