Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dark theme (& Material You theming) for widget #8719

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
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
18 changes: 0 additions & 18 deletions app-k9mail/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,6 @@

</provider>

<!-- This component is disabled by default (if possible). It will be enabled programmatically if necessary. -->
<!-- IMPORTANT: The component name must be `com.fsck.k9.widget.list.MessageListWidgetProvider` and can't be changed. -->
<receiver
android:name="com.fsck.k9.widget.list.MessageListWidgetProvider"
android:icon="@drawable/message_list_widget_preview"
android:label="@string/message_list_widget_label"
android:enabled="@bool/home_screen_widgets_enabled"
android:exported="false"
>
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/message_list_widget_info"
/>
</receiver>

<!-- This component is disabled by default (if possible). It will be enabled programmatically if necessary. -->
<!-- IMPORTANT: The component name must be `com.fsck.k9.provider.UnreadWidgetProvider` and can't be changed. -->
<receiver
Expand Down
2 changes: 0 additions & 2 deletions app-k9mail/src/main/kotlin/app/k9mail/K9KoinModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import com.fsck.k9.activity.MessageCompose
import com.fsck.k9.preferences.FilePrefixProvider
import com.fsck.k9.provider.K9ThemeProvider
import com.fsck.k9.provider.UnreadWidgetProvider
import com.fsck.k9.widget.list.MessageListWidgetProvider
import org.koin.android.ext.koin.androidContext
import org.koin.core.qualifier.named
import org.koin.dsl.binds
Expand Down Expand Up @@ -49,6 +48,5 @@ val appConfig = AppConfig(
MessageCompose::class.java,
LauncherShortcutActivity::class.java,
UnreadWidgetProvider::class.java,
MessageListWidgetProvider::class.java,
),
)

This file was deleted.

2 changes: 0 additions & 2 deletions app-k9mail/src/main/kotlin/app/k9mail/widget/KoinModule.kt
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package app.k9mail.widget

import app.k9mail.feature.widget.message.list.MessageListWidgetConfig
import app.k9mail.feature.widget.unread.UnreadWidgetConfig
import org.koin.dsl.module

val appWidgetModule = module {
single<MessageListWidgetConfig> { K9MessageListWidgetConfig() }
single<UnreadWidgetConfig> { K9UnreadWidgetConfig() }
}

This file was deleted.

18 changes: 0 additions & 18 deletions app-thunderbird/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,6 @@

</provider>

<!-- This component is disabled by default (if possible). It will be enabled programmatically if necessary. -->
<!-- IMPORTANT: The component name must be `net.thunderbird.android.widget.provider.MessageListWidgetProvider` and can't be changed. -->
<receiver
android:name="net.thunderbird.android.widget.provider.MessageListWidgetProvider"
android:icon="@drawable/message_list_widget_preview"
android:label="@string/message_list_widget_label"
android:enabled="@bool/home_screen_widgets_enabled"
android:exported="false"
>
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/message_list_widget_info"
/>
</receiver>

<!-- This component is disabled by default (if possible). It will be enabled programmatically if necessary. -->
<!-- IMPORTANT: The component name and can't be changed and always must be:
`net.thunderbird.android.widget.provider.UnreadWidgetProvider`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import net.thunderbird.android.provider.TbAppNameProvider
import net.thunderbird.android.provider.TbFeatureThemeProvider
import net.thunderbird.android.provider.TbThemeProvider
import net.thunderbird.android.widget.appWidgetModule
import net.thunderbird.android.widget.provider.MessageListWidgetProvider
import net.thunderbird.android.widget.provider.UnreadWidgetProvider
import org.koin.android.ext.koin.androidContext
import org.koin.core.qualifier.named
Expand Down Expand Up @@ -48,6 +47,5 @@ val appConfig = AppConfig(
MessageCompose::class.java,
LauncherShortcutActivity::class.java,
UnreadWidgetProvider::class.java,
MessageListWidgetProvider::class.java,
),
)
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package net.thunderbird.android.widget

import app.k9mail.feature.widget.message.list.MessageListWidgetConfig
import app.k9mail.feature.widget.unread.UnreadWidgetConfig
import org.koin.dsl.module

val appWidgetModule = module {
single<MessageListWidgetConfig> { TbMessageListWidgetConfig() }
single<UnreadWidgetConfig> { TbUnreadWidgetConfig() }
}

This file was deleted.

This file was deleted.

6 changes: 6 additions & 0 deletions feature/widget/message-list/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
plugins {
id(ThunderbirdPlugins.Library.android)
alias(libs.plugins.compose)
}

dependencies {
implementation(projects.legacy.ui.legacy)
implementation(projects.legacy.core)

implementation(libs.timber)
implementation(libs.androidx.glance.appwidget)
implementation(libs.androidx.glance.material3)
}

android {
buildFeatures {
compose = true
}
namespace = "app.k9mail.feature.widget.message.list"
}
15 changes: 10 additions & 5 deletions feature/widget/message-list/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application>

<service
android:name=".MessageListWidgetService"
android:permission="android.permission.BIND_REMOTEVIEWS"
/>
<receiver android:name="MyAppWidgetReceiver"
android:label="Message List"
android:exported="true">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/message_list_widget_info" />
</receiver>

</application>
</manifest>

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ package app.k9mail.feature.widget.message.list
import org.koin.dsl.module

val messageListWidgetModule = module {
single { MessageListWidgetManager(context = get(), messageListRepository = get(), config = get()) }
factory { MessageListLoader(preferences = get(), messageListRepository = get(), messageHelper = get()) }
}
Loading
Loading