Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ android {
applicationId "app.simple.inure"
minSdkVersion 23
targetSdkVersion 35
versionCode 10601
versionName "build106.0.1"
versionCode 10602
versionName "build107.0.0"
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

Expand Down Expand Up @@ -227,6 +227,7 @@ dependencies {
implementation 'com.google.android.flexbox:flexbox:3.0.0'
playImplementation 'com.google.android.play:review:2.0.2'
playImplementation 'com.google.android.play:review-ktx:2.0.2'
playImplementation 'com.android.billingclient:billing-ktx:7.1.1'

// Glide
implementation 'com.github.bumptech.glide:glide:4.16.0'
Expand Down
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
<uses-permission android:name="com.android.vending.BILLING" />

<uses-permission
android:name="android.permission.GET_APP_OPS_STATS"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/assets/html/changelogs.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ <h1>Change Logs</h1>

<!-- Write change logs here -->
<sub>(Current Version)</sub>
<h2>Build106.0.1</h2>
<h2>Build106.0.2</h2>

<h4>Bug Fixes</h4>

Expand Down
53 changes: 0 additions & 53 deletions app/src/play/java/app/simple/inure/dialogs/app/Purchase.kt

This file was deleted.

90 changes: 90 additions & 0 deletions app/src/play/java/app/simple/inure/ui/panels/Trial.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
package app.simple.inure.ui.panels

import android.content.SharedPreferences
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import app.simple.inure.R
import app.simple.inure.constants.Warnings
import app.simple.inure.decorations.ripple.DynamicRippleTextView
import app.simple.inure.decorations.typeface.TypeFaceTextView
import app.simple.inure.extensions.fragments.ScopedFragment
import app.simple.inure.preferences.SharedPreferences.registerEncryptedSharedPreferencesListener
import app.simple.inure.preferences.SharedPreferences.unregisterEncryptedSharedPreferencesListener
import app.simple.inure.preferences.TrialPreferences
import app.simple.inure.util.DateUtils.toDate

class Trial : ScopedFragment() {

private lateinit var title: TypeFaceTextView
private lateinit var purchase: DynamicRippleTextView
private lateinit var daysLeft: TypeFaceTextView
private lateinit var validTill: TypeFaceTextView

override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
val view = inflater.inflate(R.layout.fragment_trial_screen, container, false)

title = view.findViewById(R.id.trial_title)
purchase = view.findViewById(R.id.purchase)
daysLeft = view.findViewById(R.id.days_left)
validTill = view.findViewById(R.id.valid_till)

return view
}

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
startPostponedEnterTransition()
validTill.text = getValidTill()

if (TrialPreferences.getDaysLeft() == -1) {
title.text = Warnings.getAppIntegrityFailedWarning()
}

daysLeft.text = getString(R.string.days_trial_period_remaining, TrialPreferences.getDaysLeft())

purchase.setOnClickListener {

}
}

private fun getValidTill(): String {
return TrialPreferences.getFirstLaunchDate().plus(86_400_000L * 15L).toDate()
}

override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences?, key: String?) {
super.onSharedPreferenceChanged(sharedPreferences, key)
when (key) {
TrialPreferences.HAS_LICENSE_KEY -> {
if (TrialPreferences.isFullVersion()) {
requireActivity().runOnUiThread {
validTill.text = getString(R.string.full_version_activated)
daysLeft.text = getString(R.string.days_trial_period_remaining, 0)
}
}
}
}
}

override fun onResume() {
super.onResume()
registerEncryptedSharedPreferencesListener(this)
}

override fun onPause() {
super.onPause()
unregisterEncryptedSharedPreferencesListener(this)
}

companion object {
fun newInstance(): Trial {
val args = Bundle()
val fragment = Trial()
fragment.arguments = args
return fragment
}

const val TAG = "Trial"
}
}
45 changes: 0 additions & 45 deletions app/src/play/res/layout/dialog_purchase.xml

This file was deleted.