Repo created

This commit is contained in:
Fr4nz D13trich 2025-11-22 13:56:56 +01:00
parent 75dc487a7a
commit 39c29d175b
6317 changed files with 388324 additions and 2 deletions

View 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)
}

View file

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

View file

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

View file

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

View file

@ -0,0 +1,7 @@
package app.k9mail.feature.funding.api
enum class FundingType {
GOOGLE_PLAY,
LINK,
NO_FUNDING,
}