Skip to content
Merged
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
11 changes: 11 additions & 0 deletions core/contact/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
plugins {
id(ThunderbirdPlugins.Library.android)
}

android {
namespace = "net.thunderbird.core.contact"
}

dependencies {
implementation(projects.mail.common)
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fsck.k9.contact
package net.thunderbird.core.contact

import android.content.Intent
import android.net.Uri
Expand Down
1 change: 1 addition & 0 deletions legacy/ui/legacy/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dependencies {
implementation(projects.core.account)
implementation(projects.mail.common)
implementation(projects.uiUtils.toolbarBottomSheet)
implementation(projects.core.contact)

implementation(projects.core.featureflags)
implementation(projects.core.ui.theme.api)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@
import com.fsck.k9.activity.compose.ReplyToView;
import com.fsck.k9.activity.compose.SaveMessageTask;
import com.fsck.k9.activity.misc.Attachment;
import com.fsck.k9.autocrypt.AutocryptDraftStateHeaderParser;
import com.fsck.k9.contact.ContactIntentHelper;
import com.fsck.k9.autocrypt.AutocryptDraftStateHeaderParser;;
import app.k9mail.legacy.message.controller.MessageReference;
import com.fsck.k9.controller.MessagingController;
import app.k9mail.legacy.message.controller.MessagingListener;
Expand Down Expand Up @@ -115,6 +114,7 @@
import com.fsck.k9.ui.messagelist.DefaultFolderProvider;
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import com.google.android.material.textview.MaterialTextView;
import net.thunderbird.core.contact.ContactIntentHelper;
import net.thunderbird.core.ui.theme.manager.ThemeManager;
import net.thunderbird.feature.search.LocalSearch;
import org.openintents.openpgp.OpenPgpApiManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import com.fsck.k9.activity.compose.ComposeCryptoStatus.AttachErrorState
import com.fsck.k9.activity.compose.ComposeCryptoStatus.SendErrorState
import com.fsck.k9.autocrypt.AutocryptDraftStateHeader
import com.fsck.k9.autocrypt.AutocryptDraftStateHeaderParser
import com.fsck.k9.contact.ContactIntentHelper
import com.fsck.k9.helper.MailTo
import com.fsck.k9.helper.ReplyToParser
import com.fsck.k9.mail.Address
Expand All @@ -33,6 +32,7 @@ import com.fsck.k9.message.MessageBuilder
import com.fsck.k9.message.PgpMessageBuilder
import com.fsck.k9.ui.R
import com.fsck.k9.view.RecipientSelectView.Recipient
import net.thunderbird.core.contact.ContactIntentHelper
import org.openintents.openpgp.OpenPgpApiManager
import org.openintents.openpgp.OpenPgpApiManager.OpenPgpApiManagerCallback
import org.openintents.openpgp.OpenPgpApiManager.OpenPgpProviderError
Expand Down Expand Up @@ -633,7 +633,10 @@ class RecipientPresenter(

private fun isContactPickerAvailable(): Boolean {
val resolveInfoList =
context.packageManager.queryIntentActivities(ContactIntentHelper.getContactPickerIntent(), 0)
context.packageManager.queryIntentActivities(
ContactIntentHelper.getContactPickerIntent(),
0,
)
return resolveInfoList.isNotEmpty()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import android.widget.Toast
import androidx.core.app.ShareCompat.IntentBuilder
import androidx.core.view.isGone
import androidx.core.view.isVisible
import com.fsck.k9.contact.ContactIntentHelper
import com.fsck.k9.helper.ClipboardManager
import com.fsck.k9.helper.Utility
import com.fsck.k9.mail.Address
Expand All @@ -38,6 +37,7 @@ import com.fsck.k9.view.MessageWebView
import com.fsck.k9.view.MessageWebView.OnPageFinishedListener
import com.fsck.k9.view.WebViewConfigProvider
import com.google.android.material.textview.MaterialTextView
import net.thunderbird.core.contact.ContactIntentHelper
import org.koin.core.component.KoinComponent
import org.koin.core.component.inject
import org.koin.core.qualifier.named
Expand Down Expand Up @@ -329,7 +329,9 @@ class MessageContainerView(context: Context, attrs: AttributeSet?) :
}

MENU_ITEM_EMAIL_SAVE -> {
val intent = ContactIntentHelper.getAddEmailContactIntent(Address(email))
val intent = ContactIntentHelper.getAddEmailContactIntent(
Address(email),
)
startActivityIfAvailable(context, intent)
}

Expand Down
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -227,4 +227,5 @@ include(":feature:search")
include(":core:account")
include(":feature:notification")
include(":core:ui:theme:manager")
include(":core:contact")
include(":core:ui:account")