Loading app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt +3 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ import android.content.Intent import android.content.IntentSender import android.content.res.Configuration import android.graphics.Color import android.graphics.PorterDuffColorFilter import android.os.Bundle import android.os.Parcelable import android.util.TypedValue Loading @@ -21,6 +22,7 @@ import android.widget.Toast import androidx.appcompat.app.ActionBar import androidx.appcompat.widget.SearchView import androidx.appcompat.widget.Toolbar import androidx.core.content.ContextCompat import androidx.drawerlayout.widget.DrawerLayout import androidx.drawerlayout.widget.DrawerLayout.DrawerListener import androidx.fragment.app.FragmentManager Loading Loading @@ -334,6 +336,7 @@ open class MessageList : private fun initializeLayout() { progressBar = findViewById(R.id.message_list_progress) progressBar?.progressDrawable?.colorFilter = PorterDuffColorFilter(ContextCompat.getColor(this, R.color.color_default_accent), android.graphics.PorterDuff.Mode.SRC_IN) messageViewPlaceHolder = PlaceholderFragment() } Loading app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/AccountSetupBasics.java +7 −2 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ import com.fsck.k9.view.ClientCertificateSpinner; import com.fsck.k9.view.ClientCertificateSpinner.OnClientCertificateChangedListener; import com.google.android.material.textfield.TextInputEditText; import com.google.android.material.textfield.TextInputLayout; import org.openintents.openpgp.util.OpenPgpProviderUtil; import timber.log.Timber; /** Loading Loading @@ -197,6 +198,7 @@ public class AccountSetupBasics extends K9Activity if (split.length == 2) { String domain = split[1]; xoauth2 = OAuth2Provider.Companion.isXOAuth2(domain); } } Loading Loading @@ -251,6 +253,7 @@ public class AccountSetupBasics extends K9Activity if (mAccount == null) { mAccount = Preferences.getPreferences(this).newAccount(); mAccount.setChipColor(accountCreator.pickColor()); mAccount.setOpenPgpProvider(OpenPgpProviderUtil.getOpenPgpProviderPackage(getApplicationContext())); } mAccount.setSenderName(getOwnerName()); Loading Loading @@ -304,12 +307,13 @@ public class AccountSetupBasics extends K9Activity onManualSetup(); return; } if(xoauth2){ String email = mEmailView.getText().toString(); if(OAuth2Provider.Companion.getProvider(email).toString().trim().equals("GMAIL")){ Intent intent = new Intent(android.provider.Settings.ACTION_ADD_ACCOUNT); startActivity(intent); } else { String email = mEmailView.getText().toString(); ConnectionSettings extraConnectionSettings = ExtraAccountDiscovery.discover(email); if (extraConnectionSettings != null) { finishAutoSetup(extraConnectionSettings); Loading Loading @@ -368,6 +372,7 @@ public class AccountSetupBasics extends K9Activity if (mAccount == null) { mAccount = Preferences.getPreferences(this).newAccount(); mAccount.setChipColor(accountCreator.pickColor()); mAccount.setOpenPgpProvider(OpenPgpProviderUtil.getOpenPgpProviderPackage(getApplicationContext())); } mAccount.setSenderName(getOwnerName()); mAccount.setEmail(email); Loading app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/accountmanager/EeloAccountCreator.java +2 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ import com.fsck.k9.mail.ServerSettings; import com.fsck.k9.mailstore.SpecialLocalFoldersCreator; import com.fsck.k9.preferences.Protocols; import com.fsck.k9.ui.ConnectionSettings; import org.openintents.openpgp.util.OpenPgpProviderUtil; import timber.log.Timber; Loading @@ -34,6 +35,7 @@ public class EeloAccountCreator { account.setChipColor(accountCreator.pickColor()); account.setEmail(emailId); account.setName(emailId); account.setOpenPgpProvider(OpenPgpProviderUtil.getOpenPgpProviderPackage(context.getApplicationContext())); ConnectionSettings connectionSettings = providersXmlDiscoveryDiscover(emailId); if (connectionSettings == null) { Loading app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt +21 −4 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ import android.content.res.Resources.Theme import android.graphics.Color import android.graphics.Typeface import android.graphics.drawable.Drawable import android.opengl.Visibility import android.text.Spannable import android.text.style.AbsoluteSizeSpan import android.text.style.StyleSpan Loading Loading @@ -48,10 +49,13 @@ class MessageListAdapter internal constructor( private val forwardedIcon: Drawable = theme.resolveDrawableAttribute(R.attr.messageListForwarded) private val answeredIcon: Drawable = theme.resolveDrawableAttribute(R.attr.messageListAnswered) private val forwardedAnsweredIcon: Drawable = theme.resolveDrawableAttribute(R.attr.messageListAnsweredForwarded) private val activeItemBackgroundColor: Int = theme.resolveColorAttribute(R.attr.messageListActiveItemBackgroundColor) private val selectedItemBackgroundColor: Int = theme.resolveColorAttribute(R.attr.messageListSelectedBackgroundColor) private val activeItemBackgroundColor: Int = theme.resolveColorAttribute(R.attr.messageListActiveItemBackgroundColor) private val selectedItemBackgroundColor: Int = theme.resolveColorAttribute(R.attr.messageListSelectedBackgroundColor) private val readItemBackgroundColor: Int = theme.resolveColorAttribute(R.attr.messageListReadItemBackgroundColor) private val unreadItemBackgroundColor: Int = theme.resolveColorAttribute(R.attr.messageListUnreadItemBackgroundColor) private val unreadItemBackgroundColor: Int = theme.resolveColorAttribute(R.attr.messageListUnreadItemBackgroundColor) var messages: List<MessageListItem> = emptyList() set(value) { Loading Loading @@ -100,6 +104,7 @@ class MessageListAdapter internal constructor( override fun getView(position: Int, convertView: View?, parent: ViewGroup?): View { val message = getItem(position) val view: View = convertView ?: newView(parent) bindView(view, context, message) return view Loading @@ -120,7 +125,10 @@ class MessageListAdapter internal constructor( holder.preview.setLines(max(appearance.previewLines, 0)) appearance.fontSizes.setViewTextSize(holder.displayName, appearance.fontSizes.messageListSender) appearance.fontSizes.setViewTextSize(holder.preview, appearance.fontSizes.messageListPreview) appearance.fontSizes.setViewTextSize(holder.threadCount, appearance.fontSizes.messageListSubject) // thread count is next to subject appearance.fontSizes.setViewTextSize( holder.threadCount, appearance.fontSizes.messageListSubject ) // thread count is next to subject holder.flagged.isVisible = false holder.flagged.tag = holder Loading @@ -132,6 +140,14 @@ class MessageListAdapter internal constructor( } private fun bindView(view: View, context: Context, message: MessageListItem) { if (message.displayName.trim().toString().equals(res.getString(R.string.unknown_sender)) && message.subject?.trim().toString().equals(res.getString(R.string.general_no_subject)) ) { view.setVisibility(View.GONE) return } view.setVisibility(View.VISIBLE) val isSelected = selected.contains(message.uniqueId) val isActive = isActiveMessage(message) Loading Loading @@ -197,6 +213,7 @@ class MessageListAdapter internal constructor( } else { holder.status.isVisible = false } } } Loading app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.kt +4 −3 Original line number Diff line number Diff line Loading @@ -315,15 +315,16 @@ class MessageListFragment : } private fun setWindowProgress() { var level = 0 if (currentFolder?.loading == true) { var level = 0 val folderTotal = activityListener.getFolderTotal() if (folderTotal > 0) { level = (MAX_PROGRESS * activityListener.getFolderCompleted() / folderTotal).coerceAtMost(MAX_PROGRESS) } } fragmentListener.setMessageListProgress(level) } else { fragmentListener.setMessageListProgressEnabled(false) } } private fun setWindowTitle() { Loading Loading
app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt +3 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ import android.content.Intent import android.content.IntentSender import android.content.res.Configuration import android.graphics.Color import android.graphics.PorterDuffColorFilter import android.os.Bundle import android.os.Parcelable import android.util.TypedValue Loading @@ -21,6 +22,7 @@ import android.widget.Toast import androidx.appcompat.app.ActionBar import androidx.appcompat.widget.SearchView import androidx.appcompat.widget.Toolbar import androidx.core.content.ContextCompat import androidx.drawerlayout.widget.DrawerLayout import androidx.drawerlayout.widget.DrawerLayout.DrawerListener import androidx.fragment.app.FragmentManager Loading Loading @@ -334,6 +336,7 @@ open class MessageList : private fun initializeLayout() { progressBar = findViewById(R.id.message_list_progress) progressBar?.progressDrawable?.colorFilter = PorterDuffColorFilter(ContextCompat.getColor(this, R.color.color_default_accent), android.graphics.PorterDuff.Mode.SRC_IN) messageViewPlaceHolder = PlaceholderFragment() } Loading
app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/AccountSetupBasics.java +7 −2 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ import com.fsck.k9.view.ClientCertificateSpinner; import com.fsck.k9.view.ClientCertificateSpinner.OnClientCertificateChangedListener; import com.google.android.material.textfield.TextInputEditText; import com.google.android.material.textfield.TextInputLayout; import org.openintents.openpgp.util.OpenPgpProviderUtil; import timber.log.Timber; /** Loading Loading @@ -197,6 +198,7 @@ public class AccountSetupBasics extends K9Activity if (split.length == 2) { String domain = split[1]; xoauth2 = OAuth2Provider.Companion.isXOAuth2(domain); } } Loading Loading @@ -251,6 +253,7 @@ public class AccountSetupBasics extends K9Activity if (mAccount == null) { mAccount = Preferences.getPreferences(this).newAccount(); mAccount.setChipColor(accountCreator.pickColor()); mAccount.setOpenPgpProvider(OpenPgpProviderUtil.getOpenPgpProviderPackage(getApplicationContext())); } mAccount.setSenderName(getOwnerName()); Loading Loading @@ -304,12 +307,13 @@ public class AccountSetupBasics extends K9Activity onManualSetup(); return; } if(xoauth2){ String email = mEmailView.getText().toString(); if(OAuth2Provider.Companion.getProvider(email).toString().trim().equals("GMAIL")){ Intent intent = new Intent(android.provider.Settings.ACTION_ADD_ACCOUNT); startActivity(intent); } else { String email = mEmailView.getText().toString(); ConnectionSettings extraConnectionSettings = ExtraAccountDiscovery.discover(email); if (extraConnectionSettings != null) { finishAutoSetup(extraConnectionSettings); Loading Loading @@ -368,6 +372,7 @@ public class AccountSetupBasics extends K9Activity if (mAccount == null) { mAccount = Preferences.getPreferences(this).newAccount(); mAccount.setChipColor(accountCreator.pickColor()); mAccount.setOpenPgpProvider(OpenPgpProviderUtil.getOpenPgpProviderPackage(getApplicationContext())); } mAccount.setSenderName(getOwnerName()); mAccount.setEmail(email); Loading
app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/accountmanager/EeloAccountCreator.java +2 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ import com.fsck.k9.mail.ServerSettings; import com.fsck.k9.mailstore.SpecialLocalFoldersCreator; import com.fsck.k9.preferences.Protocols; import com.fsck.k9.ui.ConnectionSettings; import org.openintents.openpgp.util.OpenPgpProviderUtil; import timber.log.Timber; Loading @@ -34,6 +35,7 @@ public class EeloAccountCreator { account.setChipColor(accountCreator.pickColor()); account.setEmail(emailId); account.setName(emailId); account.setOpenPgpProvider(OpenPgpProviderUtil.getOpenPgpProviderPackage(context.getApplicationContext())); ConnectionSettings connectionSettings = providersXmlDiscoveryDiscover(emailId); if (connectionSettings == null) { Loading
app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt +21 −4 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ import android.content.res.Resources.Theme import android.graphics.Color import android.graphics.Typeface import android.graphics.drawable.Drawable import android.opengl.Visibility import android.text.Spannable import android.text.style.AbsoluteSizeSpan import android.text.style.StyleSpan Loading Loading @@ -48,10 +49,13 @@ class MessageListAdapter internal constructor( private val forwardedIcon: Drawable = theme.resolveDrawableAttribute(R.attr.messageListForwarded) private val answeredIcon: Drawable = theme.resolveDrawableAttribute(R.attr.messageListAnswered) private val forwardedAnsweredIcon: Drawable = theme.resolveDrawableAttribute(R.attr.messageListAnsweredForwarded) private val activeItemBackgroundColor: Int = theme.resolveColorAttribute(R.attr.messageListActiveItemBackgroundColor) private val selectedItemBackgroundColor: Int = theme.resolveColorAttribute(R.attr.messageListSelectedBackgroundColor) private val activeItemBackgroundColor: Int = theme.resolveColorAttribute(R.attr.messageListActiveItemBackgroundColor) private val selectedItemBackgroundColor: Int = theme.resolveColorAttribute(R.attr.messageListSelectedBackgroundColor) private val readItemBackgroundColor: Int = theme.resolveColorAttribute(R.attr.messageListReadItemBackgroundColor) private val unreadItemBackgroundColor: Int = theme.resolveColorAttribute(R.attr.messageListUnreadItemBackgroundColor) private val unreadItemBackgroundColor: Int = theme.resolveColorAttribute(R.attr.messageListUnreadItemBackgroundColor) var messages: List<MessageListItem> = emptyList() set(value) { Loading Loading @@ -100,6 +104,7 @@ class MessageListAdapter internal constructor( override fun getView(position: Int, convertView: View?, parent: ViewGroup?): View { val message = getItem(position) val view: View = convertView ?: newView(parent) bindView(view, context, message) return view Loading @@ -120,7 +125,10 @@ class MessageListAdapter internal constructor( holder.preview.setLines(max(appearance.previewLines, 0)) appearance.fontSizes.setViewTextSize(holder.displayName, appearance.fontSizes.messageListSender) appearance.fontSizes.setViewTextSize(holder.preview, appearance.fontSizes.messageListPreview) appearance.fontSizes.setViewTextSize(holder.threadCount, appearance.fontSizes.messageListSubject) // thread count is next to subject appearance.fontSizes.setViewTextSize( holder.threadCount, appearance.fontSizes.messageListSubject ) // thread count is next to subject holder.flagged.isVisible = false holder.flagged.tag = holder Loading @@ -132,6 +140,14 @@ class MessageListAdapter internal constructor( } private fun bindView(view: View, context: Context, message: MessageListItem) { if (message.displayName.trim().toString().equals(res.getString(R.string.unknown_sender)) && message.subject?.trim().toString().equals(res.getString(R.string.general_no_subject)) ) { view.setVisibility(View.GONE) return } view.setVisibility(View.VISIBLE) val isSelected = selected.contains(message.uniqueId) val isActive = isActiveMessage(message) Loading Loading @@ -197,6 +213,7 @@ class MessageListAdapter internal constructor( } else { holder.status.isVisible = false } } } Loading
app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.kt +4 −3 Original line number Diff line number Diff line Loading @@ -315,15 +315,16 @@ class MessageListFragment : } private fun setWindowProgress() { var level = 0 if (currentFolder?.loading == true) { var level = 0 val folderTotal = activityListener.getFolderTotal() if (folderTotal > 0) { level = (MAX_PROGRESS * activityListener.getFolderCompleted() / folderTotal).coerceAtMost(MAX_PROGRESS) } } fragmentListener.setMessageListProgress(level) } else { fragmentListener.setMessageListProgressEnabled(false) } } private fun setWindowTitle() { Loading