Code cleanup

This commit is contained in:
Koitharu
2023-07-20 14:09:07 +03:00
parent 82a3b93214
commit 513aa1a285
20 changed files with 109 additions and 140 deletions

View File

@@ -24,9 +24,7 @@ class ScrobblerManga(
if (name != other.name) return false
if (altName != other.altName) return false
if (cover != other.cover) return false
if (url != other.url) return false
return true
return url == other.url
}
override fun hashCode(): Int {

View File

@@ -16,9 +16,7 @@ class ScrobblerUser(
if (id != other.id) return false
if (nickname != other.nickname) return false
if (avatar != other.avatar) return false
if (service != other.service) return false
return true
return service == other.service
}
override fun hashCode(): Int {

View File

@@ -36,9 +36,7 @@ class ScrobblingInfo(
if (title != other.title) return false
if (coverUrl != other.coverUrl) return false
if (description != other.description) return false
if (externalUrl != other.externalUrl) return false
return true
return externalUrl == other.externalUrl
}
override fun hashCode(): Int {

View File

@@ -84,7 +84,6 @@ class ScrobblingSelectorSheet :
tab.select()
}
}
viewModel.searchQuery.observe(viewLifecycleOwner, ::onSearchQueryChanged)
}
override fun onDestroyView() {
@@ -157,10 +156,6 @@ class ScrobblingSelectorSheet :
menuItem.expandActionView()
}
private fun onSearchQueryChanged(query: String?) {
}
private fun onError(e: Throwable) {
Toast.makeText(requireContext(), e.getDisplayMessage(resources), Toast.LENGTH_LONG).show()
if (viewModel.isEmpty) {