Skip to content

Commit

Permalink
Fix news, little update
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethosa committed Sep 30, 2022
1 parent 52697c2 commit 2368eac
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ android {
minSdk 21
targetSdk 33
versionCode 29
versionName "0.10.1"
versionName "0.10.2"
ndk {
abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
}
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/com/ethosa/ktc/ui/dialog/AppUpdater.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.ethosa.ktc.ui.dialog

import android.annotation.SuppressLint
import android.content.ActivityNotFoundException
import android.content.Context
import android.content.Intent
Expand All @@ -26,6 +27,7 @@ import java.lang.Exception
/**
* AppUpdater class provides app updating
*/
@SuppressLint("HardwareIds")
class AppUpdater(
private val context: AppCompatActivity
) {
Expand Down Expand Up @@ -92,9 +94,7 @@ class AppUpdater(
println(preferences.getBoolean(omitted, false))
dialog.dismiss()
}
.setNegativeButton(R.string.update_dialog_negative) { dialog, _ ->
dialog.dismiss()
}
.setNegativeButton(R.string.update_dialog_negative) { dialog, _ -> dialog.dismiss() }
.create()
// Setup elevation
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP_MR1) {
Expand Down
8 changes: 5 additions & 3 deletions app/src/main/java/com/ethosa/ktc/ui/fragments/NewsFragment.kt
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
package com.ethosa.ktc.ui.fragments

import android.animation.ObjectAnimator
import android.annotation.SuppressLint
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.view.animation.DecelerateInterpolator
import android.widget.Toast
import androidx.core.view.ViewCompat
import androidx.core.view.ViewPropertyAnimatorListener
import androidx.fragment.app.Fragment
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
Expand Down Expand Up @@ -92,7 +91,7 @@ class NewsFragment : Fragment(), CollegeCallback {
return
}
activity?.runOnUiThread {
_binding?.news?.adapter = NewsAdapter(news.announce + news.announce)
_binding?.news?.adapter = NewsAdapter(news.announce + news.news)
_binding?.newsStories?.adapter = NewsStoriesAdapter(
(news.announce + news.news)
.filter { it.image != "" }
Expand All @@ -103,6 +102,7 @@ class NewsFragment : Fragment(), CollegeCallback {
ViewCompat.animate(it)
.setDuration(500)
.alpha(0f)
.setInterpolator(DecelerateInterpolator())
.start()
}
// stories
Expand All @@ -112,6 +112,7 @@ class NewsFragment : Fragment(), CollegeCallback {
ViewCompat.animate(it)
.setDuration(500)
.translationX(0f)
.setInterpolator(DecelerateInterpolator())
.alpha(1f)
.startDelay = 800
}
Expand All @@ -122,6 +123,7 @@ class NewsFragment : Fragment(), CollegeCallback {
ViewCompat.animate(it)
.setDuration(500)
.translationY(0f)
.setInterpolator(DecelerateInterpolator())
.alpha(1f)
.startDelay = 800
}
Expand Down

0 comments on commit 2368eac

Please sign in to comment.