-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Split legacy - part 4 #8056
Merged
Merged
Split legacy - part 4 #8056
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
701c91d
Move `MessagingListener` and `SimpleMessagingListener` to `:legacy:me…
wmontwe bc38dd5
Decouple `FolderRepository` from `MessagingController` by introducing…
wmontwe 982489e
Move `FolderRepository` to `:legacy:mailstore` module
wmontwe 9024bac
Move `MessageCountsProvider` to :legacy:message` module
wmontwe d37d4b4
Move `FoldersViewModel` to `:legacy:ui:folder`
wmontwe 19ee10e
Move `MessageReference` to `:legacy:message` module
wmontwe f259272
Change `MessageListRepository` to interface and default implementatio…
wmontwe 91a92c8
Move `AccountsViewModel` to `legacy:ui:account` module
wmontwe 97dbd9b
Add `:legacy:preferences` module and move `GeneralSettings` and `Gene…
wmontwe 49a273e
Add `:legacy:ui:theme` module and move `ThemeManager` and `ThemeProvi…
wmontwe b1825c2
Add `MessagingControllerMailChecker` to hide `MessagingController´ fr…
wmontwe 8cf6d0e
Move `ContextExtensions´ to `:core:android:common` module and changed…
wmontwe cf75daf
Move `AccountImageLoader` and `AccountFallbackImageProvider` to `:leg…
wmontwe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
7 changes: 3 additions & 4 deletions
7
...om/fsck/k9/ui/helper/ContextExtensions.kt → ...roid/common/activity/ContextExtensions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
@file:JvmName("ContextHelper") | ||
|
||
package com.fsck.k9.ui.helper | ||
package app.k9mail.core.android.common.activity | ||
|
||
import android.app.Activity | ||
import android.content.Context | ||
import android.content.ContextWrapper | ||
|
||
// Source: https://stackoverflow.com/a/58249983 | ||
tailrec fun Context.findActivity(): Activity? { | ||
return this as? Activity ?: (this as? ContextWrapper)?.baseContext?.findActivity() | ||
} | ||
tailrec fun Context.findActivity(): Activity? = this as? Activity | ||
?: (this as? ContextWrapper)?.baseContext?.findActivity() |
2 changes: 1 addition & 1 deletion
2
...et/message-list/src/main/kotlin/app/k9mail/feature/widget/message/list/MessageListItem.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...get/unread/src/main/kotlin/app/k9mail/feature/widget/unread/UnreadWidgetUpdateListener.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
legacy/common/src/main/java/com/fsck/k9/MessagingListenerProvider.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
package com.fsck.k9 | ||
|
||
import com.fsck.k9.controller.MessagingListener | ||
import app.k9mail.legacy.message.controller.MessagingListener | ||
|
||
class MessagingListenerProvider(val listeners: List<MessagingListener>) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
legacy/core/src/main/java/com/fsck/k9/controller/ControllerExtension.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
legacy/core/src/main/java/com/fsck/k9/controller/push/AccountPushControllerFactory.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...core/src/main/java/com/fsck/k9/mailstore/AutoExpandFolderBackendFoldersRefreshListener.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have a strategy to remove some of these suppressions in the future? Maybe some good first bugs to file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This specific warning is generated by our detekt code quality tool, which is desired to be reported in general. But there are cases where it is wrong or it's hard to provide the exact exception. Especially as our legacy code is designed to rely on
try/catch
constructs quite a lot. This is something we need to address when we touch that code base, but it's not easy to do.