Quellcode durchsuchen

Fix news, little update

Ethosa vor 3 Jahren
Ursprung
Commit
2368eacebe

+ 1 - 1
app/build.gradle

@@ -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'
         }

+ 3 - 3
app/src/main/java/com/ethosa/ktc/ui/dialog/AppUpdater.kt

@@ -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
@@ -26,6 +27,7 @@ import java.lang.Exception
 /**
  * AppUpdater class provides app updating
  */
+@SuppressLint("HardwareIds")
 class AppUpdater(
     private val context: AppCompatActivity
 ) {
@@ -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) {

+ 5 - 3
app/src/main/java/com/ethosa/ktc/ui/fragments/NewsFragment.kt

@@ -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
@@ -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 != "" }
@@ -103,6 +102,7 @@ class NewsFragment : Fragment(), CollegeCallback {
                 ViewCompat.animate(it)
                     .setDuration(500)
                     .alpha(0f)
+                    .setInterpolator(DecelerateInterpolator())
                     .start()
             }
             // stories
@@ -112,6 +112,7 @@ class NewsFragment : Fragment(), CollegeCallback {
                 ViewCompat.animate(it)
                     .setDuration(500)
                     .translationX(0f)
+                    .setInterpolator(DecelerateInterpolator())
                     .alpha(1f)
                     .startDelay = 800
             }
@@ -122,6 +123,7 @@ class NewsFragment : Fragment(), CollegeCallback {
                 ViewCompat.animate(it)
                     .setDuration(500)
                     .translationY(0f)
+                    .setInterpolator(DecelerateInterpolator())
                     .alpha(1f)
                     .startDelay = 800
             }