Repo created
This commit is contained in:
parent
75dc487a7a
commit
39c29d175b
6317 changed files with 388324 additions and 2 deletions
13
feature/funding/api/build.gradle.kts
Normal file
13
feature/funding/api/build.gradle.kts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
plugins {
|
||||
id(ThunderbirdPlugins.Library.androidCompose)
|
||||
alias(libs.plugins.kotlin.serialization)
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "app.k9mail.feature.funding.api"
|
||||
resourcePrefix = "funding_api_"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api(projects.core.ui.compose.navigation)
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package app.k9mail.feature.funding.api
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
|
||||
interface FundingManager {
|
||||
/**
|
||||
* Returns the type of funding.
|
||||
*/
|
||||
fun getFundingType(): FundingType
|
||||
|
||||
/**
|
||||
* Adds a funding reminder.
|
||||
*
|
||||
* The reminder is registered to the current lifecycle of the Activity.
|
||||
*
|
||||
* @param activity The activity to register the reminder to.
|
||||
* @param onOpenFunding The callback to be called when the user opens the funding.
|
||||
*/
|
||||
fun addFundingReminder(activity: AppCompatActivity, onOpenFunding: () -> Unit)
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package app.k9mail.feature.funding.api
|
||||
|
||||
import app.k9mail.core.ui.compose.navigation.Navigation
|
||||
import app.k9mail.core.ui.compose.navigation.Route
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
const val FUNDING_BASE_DEEP_LINK = "app://feature/funding"
|
||||
|
||||
sealed interface FundingRoute : Route {
|
||||
@Serializable
|
||||
data object Contribution : FundingRoute {
|
||||
override val basePath: String = BASE_PATH
|
||||
|
||||
override fun route(): String = basePath
|
||||
|
||||
const val BASE_PATH = "$FUNDING_BASE_DEEP_LINK/contribution"
|
||||
}
|
||||
}
|
||||
|
||||
interface FundingNavigation : Navigation<FundingRoute>
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package app.k9mail.feature.funding.api
|
||||
|
||||
interface FundingSettings {
|
||||
fun getReminderReferenceTimestamp(): Long
|
||||
fun setReminderReferenceTimestamp(timestamp: Long)
|
||||
|
||||
fun getReminderShownTimestamp(): Long
|
||||
fun setReminderShownTimestamp(timestamp: Long)
|
||||
|
||||
fun getActivityCounterInMillis(): Long
|
||||
fun setActivityCounterInMillis(activeTime: Long)
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
package app.k9mail.feature.funding.api
|
||||
|
||||
enum class FundingType {
|
||||
GOOGLE_PLAY,
|
||||
LINK,
|
||||
NO_FUNDING,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue