Skip to content

Commit

Permalink
Updated dependencies for release
Browse files Browse the repository at this point in the history
  • Loading branch information
manununhez committed Mar 22, 2024
1 parent d67b9b4 commit e8b8b35
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 10 deletions.
11 changes: 3 additions & 8 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ android {
applicationId "today.kinema"
minSdkVersion 24
targetSdkVersion 34
versionCode 2
versionCode 3
versionName "1.2.0"

multiDexEnabled true
Expand Down Expand Up @@ -115,13 +115,8 @@ dependencies {
annotationProcessor 'com.github.bumptech.glide:compiler:4.14.2'

//Firebase
// Import the BoM for the Firebase platform
implementation(platform("com.google.firebase:firebase-bom:32.8.0"))

// Add the dependencies for the Crashlytics and Analytics libraries
// When using the BoM, you don't specify versions in Firebase library dependencies
implementation("com.google.firebase:firebase-crashlytics")
implementation("com.google.firebase:firebase-analytics")
implementation("com.google.firebase:firebase-crashlytics:18.6.3")
implementation("com.google.firebase:firebase-analytics:21.6.1")

//Hilt
implementation "com.google.dagger:hilt-android:$hilt_version"
Expand Down
5 changes: 3 additions & 2 deletions app/src/main/java/today/kinema/repository/KinemaRepository.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import today.kinema.ui.model.WatchlistMovie
import java.text.SimpleDateFormat
import java.util.*
import javax.inject.Inject
import kotlin.math.abs

class KinemaRepository @Inject constructor(
private val remoteDataSourceImpl: RemoteDataSourceImpl,
Expand Down Expand Up @@ -140,7 +141,7 @@ class KinemaRepository @Inject constructor(
val responseServiceTimestamp = remoteDataSourceImpl.getSyncData()

if (responseServiceTimestamp.success) {
val serviceTimestamp = "2024-03-22 23:55:32"//responseServiceTimestamp.data
val serviceTimestamp = responseServiceTimestamp.data
val dateFormat = SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault())

try {
Expand All @@ -151,7 +152,7 @@ class KinemaRepository @Inject constructor(
val difference = serviceDate.time - dbDate.time
val hoursDifference = difference / (1000 * 60 * 60)

if (hoursDifference >= 24) { //24h expiration
if (abs(hoursDifference) >= 24) { //24h expiration
localDataSourceImpl.clearMovies()
localDataSourceImpl.saveSyncTimestamp(responseServiceTimestamp.data)
}
Expand Down
23 changes: 23 additions & 0 deletions app/src/main/res/drawable-v24/loading_animation.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>

<!--
~ Copyright 2019, The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->

<animated-rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/loading_img"
android:pivotX="50%"
android:pivotY="50%" />
39 changes: 39 additions & 0 deletions app/src/main/res/drawable-v24/loading_img.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<vector android:height="24dp" android:viewportHeight="72"
android:viewportWidth="72" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#cccccf"
android:pathData="M36.06,28.92L36.06,32.18"
android:strokeColor="#e7e7e7" android:strokeLineCap="round" android:strokeWidth="1"/>
<path android:fillColor="#c8c8cc"
android:pathData="M39.45,29.88L37.82,32.71"
android:strokeColor="#cacaca" android:strokeLineCap="round" android:strokeWidth="1"/>
<path android:fillColor="#bbbbbe"
android:pathData="M42.12,32.32L39.3,33.95"
android:strokeColor="#cdcdcd" android:strokeLineCap="round" android:strokeWidth="1"/>
<path android:fillColor="#b2b2b7"
android:pathData="M39.8,35.98L43.06,35.98"
android:strokeColor="#cbcbcb" android:strokeLineCap="round" android:strokeWidth="1"/>
<path android:fillColor="#d0d0d4"
android:pathData="M32.77,29.99L34.4,32.81"
android:strokeColor="#ededed" android:strokeLineCap="round" android:strokeWidth="1"/>
<path android:fillColor="#949497"
android:pathData="M30.1,32.42L32.92,34.05"
android:strokeColor="#525252" android:strokeLineCap="round" android:strokeWidth="1"/>
<path android:fillColor="#97979b"
android:pathData="M32.42,35.98L29.16,35.98"
android:strokeColor="#6e6e6e" android:strokeLineCap="round" android:strokeWidth="1"/>
<path android:fillColor="#a8a8ac"
android:pathData="M36.06,43.08L36.06,39.82"
android:strokeColor="#a0a0a0" android:strokeLineCap="round" android:strokeWidth="1"/>
<path android:fillColor="#cacaca"
android:pathData="M39.7,41.99L38.07,39.16"
android:strokeColor="#cacaca" android:strokeLineCap="round" android:strokeWidth="1"/>
<path android:fillColor="#b6b6ba"
android:pathData="M42.19,39.4L39.37,37.77"
android:strokeColor="#ccc" android:strokeLineCap="round" android:strokeWidth="1"/>
<path android:fillColor="#a1a1a5"
android:pathData="M32.46,41.98L34.09,39.16"
android:strokeColor="#909090" android:strokeLineCap="round" android:strokeWidth="1"/>
<path android:fillColor="#9d9da0"
android:pathData="M29.85,39.4L32.67,37.77"
android:strokeColor="#7a7a7a" android:strokeLineCap="round" android:strokeWidth="1"/>
</vector>

0 comments on commit e8b8b35

Please sign in to comment.