Skip to content

Commit

Permalink
bump material to 1.10.0 & make compiler happy
Browse files Browse the repository at this point in the history
  • Loading branch information
5ec1cff committed Oct 6, 2023
1 parent 628eb43 commit f0fb3a0
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,9 @@ class ForumFragment : BaseFragment() {
binding.forumDesc.text = it.desc
binding.forumAvatar.displayImage(it.avatarUrl)
binding.forumAvatar.setOnClickListener { _ ->
if (it.avatarUrl != null) {
photoViewModel.currentIndex.value = 0
photoViewModel.photos = listOf(Photo(it.avatarUrl, 0, "rotieba"))
findNavController().navigate(MobileNavigationDirections.viewPhotos())
}
photoViewModel.currentIndex.value = 0
photoViewModel.photos = listOf(Photo(it.avatarUrl, 0, "rotieba"))
findNavController().navigate(MobileNavigationDirections.viewPhotos())
}
if (!viewModel.historyAdded) {
updateHistory()
Expand Down Expand Up @@ -182,7 +180,7 @@ class ForumFragment : BaseFragment() {
}
binding.orderButton.apply {
viewModel.forumSortType.observe(viewLifecycleOwner) { sort ->
text = when (sort) {
text = when (sort!!) {
ForumSortType.REPLY_TIME -> getString(R.string.sort_by_reply_time)
ForumSortType.CREATE_TIME -> getString(R.string.sort_by_create_time)
}
Expand Down Expand Up @@ -218,7 +216,7 @@ class ForumFragment : BaseFragment() {
id = forumInfo.id.toString(),
time = System.currentTimeMillis(),
forumName = forumInfo.name,
forumAvatar = forumInfo.avatarUrl!!
forumAvatar = forumInfo.avatarUrl
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ class SearchFragment : BaseFragment() {
}

private fun performSearch(t: String, tab: Int) {
binding.searchBar.text = t
binding.searchBar.setText(t)
viewModel.currentKeyword = t
binding.searchView.hide()
if (tab >= 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -581,8 +581,6 @@ class ThreadFragment : BaseFragment() {
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE
)
}

else -> {}
}
}
addTextView()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ object PhotoUtils {
}
}

@Suppress("deprecation")
private fun savePreQ(context: Context, fileName: String, input: InputStream, isVideo: Boolean) {
val imagesDir =
Environment.getExternalStoragePublicDirectory(if (isVideo) Environment.DIRECTORY_MOVIES else Environment.DIRECTORY_PICTURES)
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ junit = "4.13.2"
androidx-test-ext-junit = "1.1.5"
espresso-core = "3.5.1"
appcompat = "1.6.1"
material = "1.9.0"
material = "1.10.0"
constraintlayout = "2.1.4"
lifecycle-livedata-ktx = "2.6.2"
lifecycle-viewmodel-ktx = "2.6.2"
Expand Down

0 comments on commit f0fb3a0

Please sign in to comment.