Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5b41f5fa authored by cketti's avatar cketti
Browse files

Integrate QR code scanner into settings import screen

parent 11e6d542
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -11,4 +11,11 @@ class K9FeatureThemeProvider : FeatureThemeProvider {
            content()
        }
    }

    @Composable
    override fun WithTheme(darkTheme: Boolean, content: @Composable () -> Unit) {
        K9MailTheme2(darkTheme = darkTheme) {
            content()
        }
    }
}
+7 −0
Original line number Diff line number Diff line
@@ -11,4 +11,11 @@ class TbFeatureThemeProvider : FeatureThemeProvider {
            content()
        }
    }

    @Composable
    override fun WithTheme(darkTheme: Boolean, content: @Composable () -> Unit) {
        ThunderbirdTheme2(darkTheme = darkTheme) {
            content()
        }
    }
}
+7 −1
Original line number Diff line number Diff line
@@ -5,9 +5,15 @@ import androidx.compose.runtime.Composable
/**
 * Provides the compose theme for a feature.
 */
fun interface FeatureThemeProvider {
interface FeatureThemeProvider {
    @Composable
    fun WithTheme(
        content: @Composable () -> Unit,
    )

    @Composable
    fun WithTheme(
        darkTheme: Boolean,
        content: @Composable () -> Unit,
    )
}
+2 −4
Original line number Diff line number Diff line
plugins {
    // TODO: Change to ThunderbirdPlugins.Library.androidCompose when integrating the feature into the app.
    id(ThunderbirdPlugins.App.androidCompose)
    id(ThunderbirdPlugins.Library.androidCompose)
}

android {
@@ -10,9 +9,8 @@ android {

dependencies {
    implementation(projects.core.common)

    implementation(projects.legacy.ui.base)
    implementation(projects.core.ui.compose.designsystem)
    debugImplementation(projects.core.ui.compose.theme2.k9mail)

    implementation(libs.androidx.camera.core)
    implementation(libs.androidx.camera.camera2)
+0 −31
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
TODO: This file only exists for manual testing during development. Remove when integrating the feature into the app.
-->
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    >

    <application
        android:name=".ui.QrCodeApplication"
        tools:ignore="MissingApplicationIcon"
        >

        <activity
            android:name=".ui.QrCodeScannerActivity"
            android:exported="true"
            android:theme="@style/Theme.Material3.Light.NoActionBar"
            >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>

        </activity>

    </application>

</manifest>
Loading