Move unread widget to :app:k9mail

This commit is contained in:
cketti 2018-06-29 16:12:20 +02:00
parent 71c79595c9
commit 9bb9e338f3
35 changed files with 42 additions and 14 deletions

View file

@ -25,7 +25,6 @@ import com.fsck.k9.service.ShutdownReceiver
import com.fsck.k9.service.StorageGoneReceiver
import com.fsck.k9.ui.endtoend.endToEndUiModule
import com.fsck.k9.ui.settings.settingsUiModule
import com.fsck.k9.widget.unread.unreadWidgetModule
import timber.log.Timber
import java.util.concurrent.SynchronousQueue
@ -34,7 +33,6 @@ object Core {
val coreModules = listOf(
mainModule,
settingsUiModule,
unreadWidgetModule,
endToEndUiModule,
openPgpModule,
autocryptModule,

View file

@ -1,11 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="message_list_item_footer_background">#eeeeee</color>
<color name="message_list_widget_header_background">#737373</color>
<color name="message_list_widget_header_text">#e4e4e4</color>
<color name="message_list_widget_divider">#e5e5e5</color>
<color name="message_list_widget_text_read">#444444</color>
<color name="message_list_widget_text_unread">#000000</color>
<color name="light_black">#444444</color>
<color name="status_todo_chevron">#888</color>

View file

@ -22,6 +22,14 @@ dependencies {
implementation project(":app:core")
testImplementation "org.robolectric:robolectric:${versions.robolectric}"
testImplementation "junit:junit:${versions.junit}"
testImplementation "com.google.truth:truth:${versions.truth}"
testImplementation "org.mockito:mockito-core:${versions.mockito}"
testImplementation "com.nhaarman:mockito-kotlin:${versions.mockitoKotlin}"
testImplementation "org.jdom:jdom2:2.0.6"
testImplementation "org.koin:koin-test:${versions.koin}"
androidTestImplementation "com.android.support.test.espresso:espresso-core:3.0.1"
}

View file

@ -5,6 +5,7 @@ import com.fsck.k9.external.externalModule
import com.fsck.k9.widget.list.MessageListWidgetUpdateListener
import com.fsck.k9.widget.list.messageListWidgetModule
import com.fsck.k9.widget.unread.UnreadWidgetUpdateListener
import com.fsck.k9.widget.unread.unreadWidgetModule
import org.koin.dsl.module.applicationContext
private val mainAppModule = applicationContext {
@ -20,5 +21,6 @@ private val mainAppModule = applicationContext {
val appModules = listOf(
mainAppModule,
externalModule,
messageListWidgetModule
messageListWidgetModule,
unreadWidgetModule
)

View file

@ -19,7 +19,7 @@ import android.widget.RemoteViews;
import android.widget.RemoteViewsService;
import com.fsck.k9.K9;
import com.fsck.k9.core.R;
import com.fsck.k9.R;
import com.fsck.k9.provider.MessageProvider;

View file

@ -10,7 +10,7 @@ import android.content.Intent;
import android.net.Uri;
import android.widget.RemoteViews;
import com.fsck.k9.core.R;
import com.fsck.k9.R;
import com.fsck.k9.activity.MessageCompose;
import com.fsck.k9.activity.MessageList;

View file

@ -11,7 +11,7 @@ import android.view.MenuItem
import android.widget.Toast
import com.fsck.k9.Preferences
import com.fsck.k9.core.R
import com.fsck.k9.R
import com.fsck.k9.activity.ChooseAccount
import com.fsck.k9.activity.ChooseFolder
import com.fsck.k9.activity.K9PreferenceActivity

View file

@ -5,7 +5,7 @@ import android.content.Intent
import com.fsck.k9.Account
import com.fsck.k9.K9
import com.fsck.k9.Preferences
import com.fsck.k9.core.R
import com.fsck.k9.R
import com.fsck.k9.activity.FolderList
import com.fsck.k9.activity.MessageList
import com.fsck.k9.controller.MessagingController

View file

@ -7,7 +7,7 @@ import android.content.Context
import android.content.Intent
import android.view.View
import android.widget.RemoteViews
import com.fsck.k9.core.R
import com.fsck.k9.R
import org.koin.standalone.KoinComponent
import org.koin.standalone.inject
import timber.log.Timber

View file

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View file

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

Before

Width:  |  Height:  |  Size: 1,011 B

After

Width:  |  Height:  |  Size: 1,011 B

View file

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View file

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="message_list_item_footer_background">#eeeeee</color>
<color name="message_list_widget_header_background">#737373</color>
<color name="message_list_widget_header_text">#e4e4e4</color>
<color name="message_list_widget_divider">#e5e5e5</color>
<color name="message_list_widget_text_read">#444444</color>
<color name="message_list_widget_text_unread">#000000</color>
</resources>

View file

@ -0,0 +1,17 @@
package com.fsck.k9
import android.app.Application
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
import org.robolectric.annotation.Config
/**
* A Robolectric test that does not create an instance of our [Application] class [K9].
*
* See also [K9RobolectricTest].
*/
@RunWith(RobolectricTestRunner::class)
@Config(application = EmptyApplication::class)
abstract class RobolectricTest
class EmptyApplication : Application()