From 47ab9aaabf3e7fcb346d52eefd2b8f227deacde0 Mon Sep 17 00:00:00 2001 From: Fahim Salam Chowdhury Date: Thu, 28 Apr 2022 14:11:58 +0600 Subject: [PATCH 01/22] 5342-Enable_opePGP_support_by_default issue: https://gitlab.e.foundation/e/backlog/-/issues/5342 --- .../fsck/k9/activity/setup/AccountSetupBasics.java | 3 +++ .../setup/accountmanager/EeloAccountCreator.java | 2 ++ .../openintents/openpgp/util/OpenPgpProviderUtil.java | 11 +++++++++++ 3 files changed, 16 insertions(+) diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/AccountSetupBasics.java b/app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/AccountSetupBasics.java index 43878dc830..cce63c3f63 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/AccountSetupBasics.java +++ b/app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/AccountSetupBasics.java @@ -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; /** @@ -251,6 +252,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()); @@ -368,6 +370,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); diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/accountmanager/EeloAccountCreator.java b/app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/accountmanager/EeloAccountCreator.java index 25f1fbcf30..d139c1cd19 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/accountmanager/EeloAccountCreator.java +++ b/app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/accountmanager/EeloAccountCreator.java @@ -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; @@ -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) { diff --git a/plugins/openpgp-api-lib/openpgp-api/src/main/java/org/openintents/openpgp/util/OpenPgpProviderUtil.java b/plugins/openpgp-api-lib/openpgp-api/src/main/java/org/openintents/openpgp/util/OpenPgpProviderUtil.java index b5e9b1e802..e2b3fd729c 100644 --- a/plugins/openpgp-api-lib/openpgp-api/src/main/java/org/openintents/openpgp/util/OpenPgpProviderUtil.java +++ b/plugins/openpgp-api-lib/openpgp-api/src/main/java/org/openintents/openpgp/util/OpenPgpProviderUtil.java @@ -9,6 +9,8 @@ import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; +import androidx.annotation.Nullable; + public class OpenPgpProviderUtil { private static final String PACKAGE_NAME_APG = "org.thialfihar.android.apg"; @@ -17,6 +19,15 @@ public class OpenPgpProviderUtil { DISALLOWED_PROVIDERS.add(PACKAGE_NAME_APG); } + @Nullable + public static String getOpenPgpProviderPackage(Context context) { + List openPgpProviderPackages = getOpenPgpProviderPackages(context); + if (openPgpProviderPackages.size() > 0) { + return openPgpProviderPackages.get(0); + } + return null; + } + public static List getOpenPgpProviderPackages(Context context) { ArrayList result = new ArrayList<>(); -- GitLab From ffa457143c9d5e3068ea1f5ce9a910b2096df970 Mon Sep 17 00:00:00 2001 From: Narinder Rana Date: Fri, 29 Apr 2022 08:45:25 +0530 Subject: [PATCH 02/22] investigation code --- .../main/java/com/fsck/k9/fragment/MessageListAdapter.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt index e07b709cf2..d3526aedaa 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt @@ -202,6 +202,13 @@ class MessageListAdapter internal constructor( } else { holder.status.isVisible = false } + + if(!holder.displayName.text.trim().toString().equals(res.getString(R.string.general_no_subject)) + && !holder.subject.text.trim().toString().equals(res.getString(R.string.general_no_subject))){ + holder.displayName.setTextColor(res.getColor(R.color.red)) + holder.subject.setTextColor(res.getColor(R.color.red)) + } + } } -- GitLab From 624cbddab8ad916d3030f462e07735b37b880e37 Mon Sep 17 00:00:00 2001 From: Narinder Rana Date: Fri, 29 Apr 2022 13:35:35 +0530 Subject: [PATCH 03/22] hide view if Ghost --- .../java/com/fsck/k9/fragment/MessageListAdapter.kt | 12 +++++++----- .../java/com/fsck/k9/fragment/MessageViewHolder.kt | 2 ++ .../legacy/src/main/res/layout/message_list_item.xml | 3 ++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt index d3526aedaa..35e8f5afa0 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt @@ -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 @@ -95,11 +96,13 @@ class MessageListAdapter internal constructor( override fun getItem(position: Int): MessageListItem = messages[position] + + override fun getView(position: Int, convertView: View?, parent: ViewGroup?): View { val message = getItem(position) val view: View = convertView ?: newView(parent) - bindView(view, context, message) + bindView(view, context, message) return view } @@ -203,10 +206,9 @@ class MessageListAdapter internal constructor( holder.status.isVisible = false } - if(!holder.displayName.text.trim().toString().equals(res.getString(R.string.general_no_subject)) - && !holder.subject.text.trim().toString().equals(res.getString(R.string.general_no_subject))){ - holder.displayName.setTextColor(res.getColor(R.color.red)) - holder.subject.setTextColor(res.getColor(R.color.red)) + if(message.displayName.trim().toString().equals(res.getString(R.string.general_no_subject)) + && message.subject?.trim().toString().equals(res.getString(R.string.general_no_subject))){ + view.setVisibility(View.GONE) } } diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageViewHolder.kt b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageViewHolder.kt index 0c5b296b18..2156a4a0f5 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageViewHolder.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageViewHolder.kt @@ -3,6 +3,7 @@ package com.fsck.k9.fragment import android.view.View import android.widget.CheckBox import android.widget.ImageView +import android.widget.LinearLayout import android.widget.TextView import com.fsck.k9.ui.R @@ -20,4 +21,5 @@ class MessageViewHolder(view: View) { val flagged: CheckBox = view.findViewById(R.id.star) val attachment: ImageView = view.findViewById(R.id.attachment) val status: ImageView = view.findViewById(R.id.status) + } diff --git a/app/ui/legacy/src/main/res/layout/message_list_item.xml b/app/ui/legacy/src/main/res/layout/message_list_item.xml index 7e43c87f61..936c296a69 100644 --- a/app/ui/legacy/src/main/res/layout/message_list_item.xml +++ b/app/ui/legacy/src/main/res/layout/message_list_item.xml @@ -6,7 +6,8 @@ android:layout_height="wrap_content" android:orientation="horizontal" android:layout_gravity="center_vertical" - tools:layout_height="?android:attr/listPreferredItemHeight"> + + tools:layout_height="?android:attr/listPreferredItemHeight"> Date: Fri, 29 Apr 2022 18:04:48 +0000 Subject: [PATCH 04/22] 5346-Swipe_refreshing_notifier_issue --- .../src/main/java/com/fsck/k9/activity/MessageList.kt | 3 +++ .../main/java/com/fsck/k9/fragment/MessageListFragment.kt | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt b/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt index f0223fbaff..a9abd17ba3 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt @@ -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 @@ -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 @@ -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() } diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.kt b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.kt index 246f6d9ef0..d9ed537fee 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.kt @@ -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) } - - fragmentListener.setMessageListProgress(level) } private fun setWindowTitle() { -- GitLab From 561821d479c549c2c023eae1be4eff1d0067c44f Mon Sep 17 00:00:00 2001 From: Narinder Rana Date: Mon, 2 May 2022 10:38:13 +0530 Subject: [PATCH 05/22] check on bindView --- .../com/fsck/k9/fragment/MessageListAdapter.kt | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt index 35e8f5afa0..e102481a71 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt @@ -102,7 +102,14 @@ class MessageListAdapter internal constructor( val message = getItem(position) val view: View = convertView ?: newView(parent) - bindView(view, context, message) + + + if(!message.displayName.trim().toString().equals(res.getString(R.string.general_no_subject)) + && !message.subject?.trim().toString().equals(res.getString(R.string.general_no_subject))){ + + bindView(view, context, message) + } + return view } @@ -206,10 +213,10 @@ class MessageListAdapter internal constructor( holder.status.isVisible = false } - if(message.displayName.trim().toString().equals(res.getString(R.string.general_no_subject)) - && message.subject?.trim().toString().equals(res.getString(R.string.general_no_subject))){ - view.setVisibility(View.GONE) - } +// if(message.displayName.trim().toString().equals(res.getString(R.string.general_no_subject)) +// && message.subject?.trim().toString().equals(res.getString(R.string.general_no_subject))){ +// view.setVisibility(View.GONE) +// } } } -- GitLab From 0b0a8d5d60ba1dd405357f33950075c39a24ec43 Mon Sep 17 00:00:00 2001 From: Narinder Rana Date: Mon, 2 May 2022 10:41:28 +0530 Subject: [PATCH 06/22] check on bindView function --- .../fsck/k9/fragment/MessageListAdapter.kt | 30 ++++++++++++------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt index e102481a71..ca8af264a3 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt @@ -47,10 +47,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 = emptyList() set(value) { @@ -96,19 +99,15 @@ class MessageListAdapter internal constructor( override fun getItem(position: Int): MessageListItem = messages[position] - - override fun getView(position: Int, convertView: View?, parent: ViewGroup?): View { val message = getItem(position) val view: View = convertView ?: newView(parent) - if(!message.displayName.trim().toString().equals(res.getString(R.string.general_no_subject)) - && !message.subject?.trim().toString().equals(res.getString(R.string.general_no_subject))){ - bindView(view, context, message) - } + bindView(view, context, message) + return view } @@ -130,7 +129,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 @@ -142,6 +144,14 @@ class MessageListAdapter internal constructor( } private fun bindView(view: View, context: Context, message: MessageListItem) { + + if (message.displayName.trim().toString().equals(res.getString(R.string.general_no_subject)) + && message.subject?.trim().toString().equals(res.getString(R.string.general_no_subject)) + ) { + view.setVisibility(View.GONE) + return + } + val isSelected = selected.contains(message.uniqueId) val isActive = isActiveMessage(message) -- GitLab From 6cdc1ab95e8c7d31632b0fe685ad0bb3ce3a3af4 Mon Sep 17 00:00:00 2001 From: Narinder Rana Date: Mon, 2 May 2022 10:44:52 +0530 Subject: [PATCH 07/22] check on bindView function show visibility --- .../src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt index ca8af264a3..7d5c2efe6f 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt @@ -151,7 +151,7 @@ class MessageListAdapter internal constructor( view.setVisibility(View.GONE) return } - + view.setVisibility(View.VISIBLE) val isSelected = selected.contains(message.uniqueId) val isActive = isActiveMessage(message) -- GitLab From 6c34e9539879241f1c4635c0f6ea3fdd5506c72e Mon Sep 17 00:00:00 2001 From: Narinder Rana Date: Mon, 2 May 2022 10:54:33 +0530 Subject: [PATCH 08/22] refine code --- .../main/java/com/fsck/k9/fragment/MessageListAdapter.kt | 9 --------- 1 file changed, 9 deletions(-) diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt index 7d5c2efe6f..79e559d248 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt @@ -103,12 +103,8 @@ class MessageListAdapter internal constructor( val message = getItem(position) val view: View = convertView ?: newView(parent) - - - bindView(view, context, message) - return view } @@ -223,11 +219,6 @@ class MessageListAdapter internal constructor( holder.status.isVisible = false } -// if(message.displayName.trim().toString().equals(res.getString(R.string.general_no_subject)) -// && message.subject?.trim().toString().equals(res.getString(R.string.general_no_subject))){ -// view.setVisibility(View.GONE) -// } - } } -- GitLab From d48b4446a004e3fd30dfc7c3858590b03cc7d798 Mon Sep 17 00:00:00 2001 From: Narinder Rana Date: Mon, 2 May 2022 10:55:43 +0530 Subject: [PATCH 09/22] refine code and update string --- .../src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt index 79e559d248..3a42cf1964 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt @@ -141,7 +141,7 @@ class MessageListAdapter internal constructor( private fun bindView(view: View, context: Context, message: MessageListItem) { - if (message.displayName.trim().toString().equals(res.getString(R.string.general_no_subject)) + 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) -- GitLab From 67bd17109ea02cb94e66f3b3ba4e3df429fb36ed Mon Sep 17 00:00:00 2001 From: Narinder Rana Date: Tue, 3 May 2022 22:20:41 +0530 Subject: [PATCH 10/22] update redirect condition check only for Google Domain not all xoauth --- .../java/com/fsck/k9/activity/setup/AccountSetupBasics.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/AccountSetupBasics.java b/app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/AccountSetupBasics.java index cce63c3f63..30d9521fd4 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/AccountSetupBasics.java +++ b/app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/AccountSetupBasics.java @@ -198,6 +198,7 @@ public class AccountSetupBasics extends K9Activity if (split.length == 2) { String domain = split[1]; xoauth2 = OAuth2Provider.Companion.isXOAuth2(domain); + } } @@ -306,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); -- GitLab From 88f258294f3df01ff4442d7953e3acc6b40b16b1 Mon Sep 17 00:00:00 2001 From: Fahim Salam Chowdhury Date: Sun, 8 May 2022 01:56:38 +0600 Subject: [PATCH 11/22] update unread message indicator - hide unread message different background preference general_settings - remove unread message different background messageItem logic - add unread message green dot indicator --- .../java/com/fsck/k9/fragment/MessageListAdapter.kt | 10 +++++----- .../java/com/fsck/k9/fragment/MessageViewHolder.kt | 1 + .../legacy/src/main/res/drawable/ic_unread_message.xml | 10 ++++++++++ .../legacy/src/main/res/layout/message_list_item.xml | 9 +++++++++ app/ui/legacy/src/main/res/xml/general_settings.xml | 1 + 5 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 app/ui/legacy/src/main/res/drawable/ic_unread_message.xml diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt index b09882b3c5..8cbd41f920 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt @@ -12,7 +12,9 @@ import android.text.style.StyleSpan import android.view.LayoutInflater import android.view.View import android.view.View.GONE +import android.view.View.INVISIBLE import android.view.View.OnClickListener +import android.view.View.VISIBLE import android.view.ViewGroup import android.widget.BaseAdapter import android.widget.ImageView @@ -165,7 +167,8 @@ class MessageListAdapter internal constructor( if (appearance.showContactPicture && holder.contactPicture.isVisible) { setContactPicture(holder.contactPicture, displayAddress) } - setBackgroundColor(view, isSelected, isRead, isActive) + setBackgroundColor(view, isSelected, isActive) + holder.unreadMessageIndicator.visibility = if (isRead) INVISIBLE else VISIBLE updateWithThreadCount(holder, displayThreadCount) val beforePreviewText = if (appearance.senderAboveSubject) subject else displayName holder.displayName.setText(beforePreviewText, TextView.BufferType.SPANNABLE) @@ -242,13 +245,10 @@ class MessageListAdapter internal constructor( return null } - private fun setBackgroundColor(view: View, selected: Boolean, read: Boolean, active: Boolean) { - val backGroundAsReadIndicator = appearance.backGroundAsReadIndicator + private fun setBackgroundColor(view: View, selected: Boolean, active: Boolean) { val backgroundColor = when { active -> activeItemBackgroundColor selected -> selectedItemBackgroundColor - backGroundAsReadIndicator && read -> readItemBackgroundColor - backGroundAsReadIndicator && !read -> unreadItemBackgroundColor else -> ContextCompat.getColor(view.context, R.color.color_default_background) } diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageViewHolder.kt b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageViewHolder.kt index 0c5b296b18..74278607ab 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageViewHolder.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageViewHolder.kt @@ -20,4 +20,5 @@ class MessageViewHolder(view: View) { val flagged: CheckBox = view.findViewById(R.id.star) val attachment: ImageView = view.findViewById(R.id.attachment) val status: ImageView = view.findViewById(R.id.status) + val unreadMessageIndicator : View = view.findViewById(R.id.unread_message_indicator) } diff --git a/app/ui/legacy/src/main/res/drawable/ic_unread_message.xml b/app/ui/legacy/src/main/res/drawable/ic_unread_message.xml new file mode 100644 index 0000000000..a74cc51ea8 --- /dev/null +++ b/app/ui/legacy/src/main/res/drawable/ic_unread_message.xml @@ -0,0 +1,10 @@ + + + + + + + \ No newline at end of file diff --git a/app/ui/legacy/src/main/res/layout/message_list_item.xml b/app/ui/legacy/src/main/res/layout/message_list_item.xml index b303cdc4c0..478ea5fe98 100644 --- a/app/ui/legacy/src/main/res/layout/message_list_item.xml +++ b/app/ui/legacy/src/main/res/layout/message_list_item.xml @@ -8,6 +8,15 @@ android:layout_gravity="center_vertical" tools:layout_height="?android:attr/listPreferredItemHeight"> + + -- GitLab From 21d8199d3c857b2e0a3924a2cfb4d1459d1e75aa Mon Sep 17 00:00:00 2001 From: Fahim Salam Chowdhury Date: Sun, 8 May 2022 14:11:20 +0600 Subject: [PATCH 12/22] Update messageListItem View - remove showContactImageInMessageList setting - remove contact image view reference from messageList - update messageListItem view's scale & colors according to mock-up - move selection circle to right-side of the screen - update selection mode item visibility according to mock-up --- .../src/main/res/values-night/colors.xml | 2 +- app/k9mail/src/main/res/values/colors.xml | 2 +- app/k9mail/src/main/res/values/themes.xml | 12 +- app/ui/base/src/main/res/values/colors.xml | 1 - .../fsck/k9/fragment/MessageListAdapter.kt | 40 +-- .../com/fsck/k9/fragment/MessageViewHolder.kt | 2 +- .../main/res/drawable/ic_add_attachment.xml | 10 + .../res/drawable/ic_check_circle_large.xml | 19 +- .../res/drawable/ic_chevron_right_small.xml | 11 + .../drawable/ic_messagelist_attachment.xml | 12 +- .../drawable/ic_non_check_circle_large.xml | 6 +- .../res/drawable/thread_count_box_light.xml | 13 +- .../src/main/res/layout/message_list_item.xml | 316 ++++++++---------- .../src/main/res/values-night/colors.xml | 2 + app/ui/legacy/src/main/res/values/colors.xml | 2 + .../src/main/res/xml/general_settings.xml | 3 +- 16 files changed, 225 insertions(+), 228 deletions(-) create mode 100644 app/ui/legacy/src/main/res/drawable/ic_add_attachment.xml create mode 100644 app/ui/legacy/src/main/res/drawable/ic_chevron_right_small.xml diff --git a/app/k9mail/src/main/res/values-night/colors.xml b/app/k9mail/src/main/res/values-night/colors.xml index 8b7b4c3e09..a92111f554 100644 --- a/app/k9mail/src/main/res/values-night/colors.xml +++ b/app/k9mail/src/main/res/values-night/colors.xml @@ -2,7 +2,7 @@ #121212 #2F2F2F - #61FFFFFF + #1FFFFFFF #DEFFFFFF #99FFFFFF #61FFFFFF diff --git a/app/k9mail/src/main/res/values/colors.xml b/app/k9mail/src/main/res/values/colors.xml index 43d0c5328d..a6b43eecef 100644 --- a/app/k9mail/src/main/res/values/colors.xml +++ b/app/k9mail/src/main/res/values/colors.xml @@ -14,7 +14,7 @@ @lineageos.platform:color/color_default_selector_background #DCDCDC - #61000000 + #14212121 @android:color/white #ededed diff --git a/app/k9mail/src/main/res/values/themes.xml b/app/k9mail/src/main/res/values/themes.xml index 6331080f77..289ffd55d6 100644 --- a/app/k9mail/src/main/res/values/themes.xml +++ b/app/k9mail/src/main/res/values/themes.xml @@ -43,7 +43,7 @@ @drawable/ic_send @drawable/ic_alert_octagon @drawable/ic_trash_can - @drawable/ic_messagelist_attachment + @drawable/ic_add_attachment @drawable/ic_archive @drawable/ic_pencil @drawable/ic_trash_can @@ -99,10 +99,10 @@ @color/color_message_list_selected_background @color/color_default_background @color/color_message_list_unread_background - ?android:attr/colorBackground + @color/color_default_primary_text @drawable/thread_count_box_light @color/color_default_accent - @color/color_default_secondary_text + @color/color_default_ternary_text @color/color_default_divider @color/default_icon_color @drawable/ic_messagelist_attachment @@ -169,7 +169,7 @@ @drawable/ic_send @drawable/ic_alert_octagon @drawable/ic_trash_can - @drawable/ic_messagelist_attachment + @drawable/ic_add_attachment @drawable/ic_archive @drawable/ic_pencil @drawable/ic_trash_can @@ -225,10 +225,10 @@ @color/color_message_list_selected_background #c0cdcdcd @color/color_message_list_unread_background - ?android:attr/colorBackground + @color/color_default_primary_text @drawable/thread_count_box_light @color/color_default_accent - @color/color_default_secondary_text + @color/color_default_ternary_text @color/color_default_divider #bbbbbb @drawable/ic_messagelist_attachment diff --git a/app/ui/base/src/main/res/values/colors.xml b/app/ui/base/src/main/res/values/colors.xml index 5b0ddc7556..5eaa8403b3 100644 --- a/app/ui/base/src/main/res/values/colors.xml +++ b/app/ui/base/src/main/res/values/colors.xml @@ -1,7 +1,6 @@ @color/color_default_secondary_text - @lineageos.platform:color/color_default_blue3 @lineageos.platform:color/color_default_primary @lineageos.platform:color/color_default_primary_dark diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt index 563011e465..aa76257bbc 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt @@ -3,10 +3,8 @@ package com.fsck.k9.fragment import android.content.Context import android.content.res.Resources 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 @@ -21,7 +19,6 @@ import android.widget.BaseAdapter import android.widget.ImageView import android.widget.TextView import androidx.core.content.ContextCompat -import androidx.core.graphics.drawable.DrawableCompat import androidx.core.view.isVisible import com.fsck.k9.FontSizes import com.fsck.k9.contacts.ContactPictureLoader @@ -115,9 +112,6 @@ class MessageListAdapter internal constructor( val holder = MessageViewHolder(view) - view.findViewById(R.id.contact_picture_container).isVisible = appearance.showContactPicture - holder.contactPicture.setOnClickListener(contactPictureClickListener) - appearance.fontSizes.setViewTextSize(holder.subject, subjectViewFontSize) appearance.fontSizes.setViewTextSize(holder.date, appearance.fontSizes.messageListDate) @@ -153,19 +147,21 @@ class MessageListAdapter internal constructor( val holder = view.tag as MessageViewHolder - if (appearance.showContactPicture) { - if (isInSelectionMode) { - holder.contactPicture.isVisible = false - if (isSelected) { - holder.selected.setImageResource(R.drawable.ic_check_circle_large) - } else { - holder.selected.setImageResource(R.drawable.ic_non_check_circle_large) - } - holder.selected.isVisible = true + if (isInSelectionMode) { + if (isSelected) { + holder.selected.setImageResource(R.drawable.ic_check_circle_large) } else { - holder.selected.isVisible = false - holder.contactPicture.isVisible = true + holder.selected.setImageResource(R.drawable.ic_non_check_circle_large) } + holder.selected.isVisible = true + holder.date.visibility = INVISIBLE + holder.rightCheveron.visibility = INVISIBLE + holder.threadCount.isVisible = false + holder.attachment.isVisible = false + } else { + holder.selected.isVisible = false + holder.date.visibility = VISIBLE + holder.rightCheveron.visibility = VISIBLE } with(message) { @@ -180,12 +176,9 @@ class MessageListAdapter internal constructor( holder.flagged.isVisible = false } holder.position = position - if (appearance.showContactPicture && holder.contactPicture.isVisible) { - setContactPicture(holder.contactPicture, displayAddress) - } + setBackgroundColor(view, isSelected, isActive) holder.unreadMessageIndicator.visibility = if (isRead) INVISIBLE else VISIBLE - updateWithThreadCount(holder, displayThreadCount) val beforePreviewText = if (appearance.senderAboveSubject) subject else displayName holder.displayName.setText(beforePreviewText, TextView.BufferType.SPANNABLE) formatDisplayText(holder.displayName, isRead) @@ -204,7 +197,10 @@ class MessageListAdapter internal constructor( } holder.date.text = displayDate - holder.attachment.isVisible = hasAttachments + if (!isInSelectionMode) { + holder.attachment.isVisible = hasAttachments + updateWithThreadCount(holder, displayThreadCount) + } val statusHolder = buildStatusHolder(isForwarded, isAnswered) if (statusHolder != null) { diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageViewHolder.kt b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageViewHolder.kt index bf839be958..31ec0a8c14 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageViewHolder.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageViewHolder.kt @@ -11,7 +11,6 @@ class MessageViewHolder(view: View) { var position = -1 val selected: ImageView = view.findViewById(R.id.selected) - val contactPicture: ImageView = view.findViewById(R.id.contact_picture) val subject: TextView = view.findViewById(R.id.subject) val displayName: TextView = view.findViewById(R.id.displayName) val preview: TextView = view.findViewById(R.id.preview) @@ -22,4 +21,5 @@ class MessageViewHolder(view: View) { val attachment: ImageView = view.findViewById(R.id.attachment) val status: ImageView = view.findViewById(R.id.status) val unreadMessageIndicator : View = view.findViewById(R.id.unread_message_indicator) + val rightCheveron : View = view.findViewById(R.id.right_chevron) } diff --git a/app/ui/legacy/src/main/res/drawable/ic_add_attachment.xml b/app/ui/legacy/src/main/res/drawable/ic_add_attachment.xml new file mode 100644 index 0000000000..2297689e06 --- /dev/null +++ b/app/ui/legacy/src/main/res/drawable/ic_add_attachment.xml @@ -0,0 +1,10 @@ + + + + diff --git a/app/ui/legacy/src/main/res/drawable/ic_check_circle_large.xml b/app/ui/legacy/src/main/res/drawable/ic_check_circle_large.xml index 53f3910c86..a66d882bf1 100644 --- a/app/ui/legacy/src/main/res/drawable/ic_check_circle_large.xml +++ b/app/ui/legacy/src/main/res/drawable/ic_check_circle_large.xml @@ -1,15 +1,12 @@ + android:width="32dp" + android:height="32dp" + android:viewportWidth="32" + android:viewportHeight="32"> + android:pathData="M16,16m-16,0a16,16 0,1 1,32 0a16,16 0,1 1,-32 0" + android:fillColor="@color/color_default_accent"/> + android:pathData="M13.3292,19.2293L9.8542,15.7543L8.6709,16.9293L13.3292,21.5876L23.3292,11.5876L22.1542,10.4126L13.3292,19.2293Z" + android:fillColor="@color/color_default_background"/> diff --git a/app/ui/legacy/src/main/res/drawable/ic_chevron_right_small.xml b/app/ui/legacy/src/main/res/drawable/ic_chevron_right_small.xml new file mode 100644 index 0000000000..a47f709092 --- /dev/null +++ b/app/ui/legacy/src/main/res/drawable/ic_chevron_right_small.xml @@ -0,0 +1,11 @@ + + + + + diff --git a/app/ui/legacy/src/main/res/drawable/ic_messagelist_attachment.xml b/app/ui/legacy/src/main/res/drawable/ic_messagelist_attachment.xml index bc4e23627d..8c7617345d 100644 --- a/app/ui/legacy/src/main/res/drawable/ic_messagelist_attachment.xml +++ b/app/ui/legacy/src/main/res/drawable/ic_messagelist_attachment.xml @@ -1,9 +1,9 @@ + android:width="16dp" + android:height="16dp" + android:viewportWidth="16" + android:viewportHeight="16"> + android:fillColor="@color/default_icon_color" + android:pathData="M11.9997,10.6666L4.333,10.6666C2.8597,10.6666 1.6663,9.4733 1.6663,7.9999C1.6663,6.5266 2.8597,5.3333 4.333,5.3333L12.6663,5.3333C13.5863,5.3333 14.333,6.0799 14.333,6.9999C14.333,7.9199 13.5863,8.6666 12.6663,8.6666L5.6663,8.6666C5.2997,8.6666 4.9997,8.3666 4.9997,7.9999C4.9997,7.6333 5.2997,7.3333 5.6663,7.3333L11.9997,7.3333L11.9997,6.3333L5.6663,6.3333C4.7463,6.3333 3.9997,7.0799 3.9997,7.9999C3.9997,8.9199 4.7463,9.6666 5.6663,9.6666L12.6663,9.6666C14.1397,9.6666 15.333,8.4733 15.333,6.9999C15.333,5.5266 14.1397,4.3333 12.6663,4.3333L4.333,4.3333C2.3063,4.3333 0.6663,5.9732 0.6663,7.9999C0.6663,10.0266 2.3063,11.6666 4.333,11.6666L11.9997,11.6666L11.9997,10.6666Z" /> diff --git a/app/ui/legacy/src/main/res/drawable/ic_non_check_circle_large.xml b/app/ui/legacy/src/main/res/drawable/ic_non_check_circle_large.xml index 7bbffe9f6f..e615ee0071 100644 --- a/app/ui/legacy/src/main/res/drawable/ic_non_check_circle_large.xml +++ b/app/ui/legacy/src/main/res/drawable/ic_non_check_circle_large.xml @@ -6,9 +6,9 @@ + android:color="@color/color_default_ternary_text" /> + android:width="32dp" + android:height="32dp"/> diff --git a/app/ui/legacy/src/main/res/drawable/thread_count_box_light.xml b/app/ui/legacy/src/main/res/drawable/thread_count_box_light.xml index 4eda0ac2e9..b059365b53 100644 --- a/app/ui/legacy/src/main/res/drawable/thread_count_box_light.xml +++ b/app/ui/legacy/src/main/res/drawable/thread_count_box_light.xml @@ -1,10 +1,9 @@ - - - - - + + + diff --git a/app/ui/legacy/src/main/res/layout/message_list_item.xml b/app/ui/legacy/src/main/res/layout/message_list_item.xml index 4009195668..cb3b574825 100644 --- a/app/ui/legacy/src/main/res/layout/message_list_item.xml +++ b/app/ui/legacy/src/main/res/layout/message_list_item.xml @@ -1,226 +1,206 @@ + android:layout_marginTop="15dp" + android:background="@drawable/ic_unread_message" + android:visibility="invisible" /> - + android:layout_marginStart="13dp" + android:layout_marginTop="7dp" + android:layout_marginEnd="4dp" + android:layout_marginBottom="7dp" + android:clickable="false" + android:focusable="false" + android:focusableInTouchMode="false"> - + android:layout_height="wrap_content" + android:layout_alignParentStart="true" + android:layout_alignParentTop="true" + android:layout_toStartOf="@+id/date"> - + - + + + + - + android:layout_toStartOf="@id/extra_info_holder"> + tools:src="@drawable/ic_messagelist_answered" /> - - - + android:layout_alignWithParentIfMissing="false" + android:layout_alignParentTop="true" + android:layout_alignParentEnd="true" + android:layout_toEndOf="@id/status" + android:bufferType="spannable" + android:ellipsize="end" + android:gravity="top" + android:longClickable="false" + android:singleLine="true" + android:textAppearance="@style/TextAppearance.K9.Small" + android:textColor="@color/color_default_secondary_text" + tools:text="Message preview" /> + tools:text="Message preview" /> - + + + android:layout_alignParentEnd="true" + android:layout_marginTop="14dp" + android:layout_marginEnd="7dp" + android:background="?attr/messageListThreadCountBackground" + android:focusable="false" + android:padding="4dp" + android:textAlignment="center" + android:textColor="?attr/messageListThreadCountForegroundColor" + android:textSize="12sp" + tools:text="3" /> - + android:layout_toStartOf="@+id/thread_count" + android:contentDescription="@null" + app:srcCompat="?attr/messageListAttachment" /> - - - + app:srcCompat="@drawable/ic_check_circle_large" /> + - - + + + android:layout_centerVertical="true" + android:layout_marginEnd="4dp" + android:contentDescription="@null" + android:src="@drawable/ic_chevron_right_small" /> diff --git a/app/ui/legacy/src/main/res/values-night/colors.xml b/app/ui/legacy/src/main/res/values-night/colors.xml index f154cb310e..0be7eede65 100644 --- a/app/ui/legacy/src/main/res/values-night/colors.xml +++ b/app/ui/legacy/src/main/res/values-night/colors.xml @@ -11,4 +11,6 @@ #363636 #2e2e2e + + #1FFFFFFF \ No newline at end of file diff --git a/app/ui/legacy/src/main/res/values/colors.xml b/app/ui/legacy/src/main/res/values/colors.xml index 23c9fd51fe..065f0f945a 100644 --- a/app/ui/legacy/src/main/res/values/colors.xml +++ b/app/ui/legacy/src/main/res/values/colors.xml @@ -36,4 +36,6 @@ #fafafa #145DB2FF @android:color/white + + #14212121 diff --git a/app/ui/legacy/src/main/res/xml/general_settings.xml b/app/ui/legacy/src/main/res/xml/general_settings.xml index 80ec3d2343..864418d9e9 100644 --- a/app/ui/legacy/src/main/res/xml/general_settings.xml +++ b/app/ui/legacy/src/main/res/xml/general_settings.xml @@ -330,7 +330,8 @@ android:key="messagelist_show_contact_picture" android:layout="@layout/custom_preference" android:summary="@string/global_settings_show_contact_picture_summary" - android:title="@string/global_settings_show_contact_picture_label" /> + android:title="@string/global_settings_show_contact_picture_label" + app:isPreferenceVisible="false" /> Date: Sun, 8 May 2022 14:31:22 +0600 Subject: [PATCH 13/22] Fix unread messageListItem textView typeFace mismatch issue --- .../src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt index aa76257bbc..d86499d9f0 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt @@ -165,7 +165,6 @@ class MessageListAdapter internal constructor( } with(message) { - val maybeBoldTypeface = if (isRead) Typeface.NORMAL else Typeface.BOLD val displayDate = relativeDateTimeFormatter.formatDate(messageDate) val displayThreadCount = if (appearance.showingThreadedList) threadCount else 0 val subject = MlfUtils.buildSubject(subject, res.getString(R.string.general_no_subject), displayThreadCount) @@ -181,7 +180,6 @@ class MessageListAdapter internal constructor( holder.unreadMessageIndicator.visibility = if (isRead) INVISIBLE else VISIBLE val beforePreviewText = if (appearance.senderAboveSubject) subject else displayName holder.displayName.setText(beforePreviewText, TextView.BufferType.SPANNABLE) - formatDisplayText(holder.displayName, isRead) if (appearance.previewLines > 0) { val preview = getPreview(isMessageEncrypted, previewText) holder.preview.setText(preview, TextView.BufferType.SPANNABLE) @@ -189,7 +187,6 @@ class MessageListAdapter internal constructor( holder.preview.visibility = GONE } - holder.subject.typeface = Typeface.create(holder.subject.typeface, maybeBoldTypeface) if (appearance.senderAboveSubject) { holder.subject.text = displayName } else { -- GitLab From 14fbd2ce1312aa389aaa2ab6ea2b384a1493433d Mon Sep 17 00:00:00 2001 From: Fahim Salam Chowdhury Date: Sun, 8 May 2022 14:37:06 +0600 Subject: [PATCH 14/22] Fix unread messageListItem textView typeFace mismatch issue --- .../src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt index d86499d9f0..4218d07783 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt @@ -165,6 +165,7 @@ class MessageListAdapter internal constructor( } with(message) { + val maybeBoldTypeface = if (isRead) Typeface.NORMAL else Typeface.BOLD val displayDate = relativeDateTimeFormatter.formatDate(messageDate) val displayThreadCount = if (appearance.showingThreadedList) threadCount else 0 val subject = MlfUtils.buildSubject(subject, res.getString(R.string.general_no_subject), displayThreadCount) @@ -187,6 +188,7 @@ class MessageListAdapter internal constructor( holder.preview.visibility = GONE } + holder.subject.typeface = Typeface.create(holder.subject.typeface, maybeBoldTypeface) if (appearance.senderAboveSubject) { holder.subject.text = displayName } else { -- GitLab From 293bb87f8a31bf00e3654c961ade4c6fb92f7db5 Mon Sep 17 00:00:00 2001 From: Fahim Salam Chowdhury Date: Mon, 9 May 2022 14:13:41 +0600 Subject: [PATCH 15/22] Update actionMode icon tint - add separate theme for actionMode - update ic_close icon color - fix recipientToken text goes outside background issue by setting up maxLength --- app/ui/base/src/main/res/values/styles.xml | 15 +++++++++++++-- app/ui/legacy/src/main/res/drawable/ic_close.xml | 9 +++++---- .../src/main/res/layout/recipient_token_item.xml | 1 + 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/app/ui/base/src/main/res/values/styles.xml b/app/ui/base/src/main/res/values/styles.xml index c4c022a5d1..5e462dd472 100644 --- a/app/ui/base/src/main/res/values/styles.xml +++ b/app/ui/base/src/main/res/values/styles.xml @@ -3,10 +3,21 @@ + + + \ No newline at end of file diff --git a/app/ui/legacy/src/main/res/drawable/ic_close.xml b/app/ui/legacy/src/main/res/drawable/ic_close.xml index b7b59abdda..9b5c5e25b1 100644 --- a/app/ui/legacy/src/main/res/drawable/ic_close.xml +++ b/app/ui/legacy/src/main/res/drawable/ic_close.xml @@ -1,9 +1,10 @@ + + android:viewportWidth="24" + android:viewportHeight="24"> + android:fillColor="@color/color_default_primary_text" + android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/> diff --git a/app/ui/legacy/src/main/res/layout/recipient_token_item.xml b/app/ui/legacy/src/main/res/layout/recipient_token_item.xml index b7367c271f..1262310d25 100644 --- a/app/ui/legacy/src/main/res/layout/recipient_token_item.xml +++ b/app/ui/legacy/src/main/res/layout/recipient_token_item.xml @@ -41,6 +41,7 @@ android:id="@android:id/text1" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:maxWidth="235dp" android:layout_marginStart="8dp" android:ellipsize="end" android:maxLines="1" -- GitLab From 8908883d24ddf7d698553bdc3fa6b2fdb50df750 Mon Sep 17 00:00:00 2001 From: Fahim Salam Chowdhury Date: Mon, 9 May 2022 16:38:51 +0600 Subject: [PATCH 16/22] show unread mail count on the actionBar subtitle --- .../fsck/k9/fragment/MessageListFragment.kt | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.kt b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.kt index d9ed537fee..90bf019f1a 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.kt @@ -44,16 +44,17 @@ import com.fsck.k9.ui.R import com.fsck.k9.ui.choosefolder.ChooseFolderActivity import com.fsck.k9.ui.folders.FolderNameFormatter import com.fsck.k9.ui.folders.FolderNameFormatterFactory +import com.fsck.k9.ui.folders.FoldersViewModel import com.fsck.k9.ui.helper.RelativeDateTimeFormatter import com.fsck.k9.ui.messagelist.MessageListAppearance import com.fsck.k9.ui.messagelist.MessageListConfig import com.fsck.k9.ui.messagelist.MessageListInfo import com.fsck.k9.ui.messagelist.MessageListItem import com.fsck.k9.ui.messagelist.MessageListViewModel -import java.util.HashSet import java.util.concurrent.Future import net.jcip.annotations.GuardedBy import org.koin.android.ext.android.inject +import org.koin.androidx.viewmodel.ext.android.sharedViewModel import org.koin.androidx.viewmodel.ext.android.viewModel import timber.log.Timber @@ -64,6 +65,7 @@ class MessageListFragment : ConfirmationDialogFragmentListener, MessageListItemActionListener { + private val foldersViewModel: FoldersViewModel by sharedViewModel() private val viewModel: MessageListViewModel by viewModel() private val sortTypeToastProvider: SortTypeToastProvider by inject() private val folderNameFormatterFactory: FolderNameFormatterFactory by inject() @@ -100,6 +102,8 @@ class MessageListFragment : private var actionMode: ActionMode? = null private var hasConnectivity: Boolean? = null + private var unreadMessageCount : Int = 0 + /** * Relevant messages for the current context when we have to remember the chosen messages * between user interactions (e.g. selecting a folder for move operation). @@ -153,6 +157,18 @@ class MessageListFragment : setMessageList(messageListInfo) } + if (!isUnifiedInbox && currentFolder != null) { + foldersViewModel.getFolderListLiveData().observe(this) { folderList -> + folderList.folders.forEach { + if (it.folder.id == currentFolder?.databaseId) { + unreadMessageCount = it.unreadMessageCount + setWindowTitle() + return@forEach + } + } + } + } + isInitialized = true } @@ -341,7 +357,14 @@ class MessageListFragment : if (account == null || isUnifiedInbox || preferences.accounts.size == 1) { null } else { - account.displayName + var name = account.displayName + if (unreadMessageCount > 0) { + if (name.length > 10) { + name = name.substring(0, 10) + "..." + } + name += "[$unreadMessageCount]" + } + name } } -- GitLab From 514aab4288671590f0109f680a6adaa186e7b052 Mon Sep 17 00:00:00 2001 From: Fahim Salam Chowdhury Date: Mon, 9 May 2022 17:04:49 +0600 Subject: [PATCH 17/22] Update actionBar style - update title & subtilte color - update actionBar background & window color (to update the popup background colors) - update custom account spinner actionBar textStyle --- app/ui/base/src/main/res/values/styles.xml | 4 ++++ app/ui/legacy/src/main/res/layout/account_spinner_item.xml | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/app/ui/base/src/main/res/values/styles.xml b/app/ui/base/src/main/res/values/styles.xml index 5e462dd472..9b3825838f 100644 --- a/app/ui/base/src/main/res/values/styles.xml +++ b/app/ui/base/src/main/res/values/styles.xml @@ -7,6 +7,10 @@ @drawable/edittext_cursor @drawable/ic_arrow_back @drawable/ic_arrow_back + @color/color_default_primary_text + @color/color_default_ternary_text + @color/color_default_primary_dark + @color/color_default_primary_dark + + diff --git a/app/ui/legacy/src/main/res/layout/message_list_item.xml b/app/ui/legacy/src/main/res/layout/message_list_item.xml index cb3b574825..a98fdec9c4 100644 --- a/app/ui/legacy/src/main/res/layout/message_list_item.xml +++ b/app/ui/legacy/src/main/res/layout/message_list_item.xml @@ -152,6 +152,7 @@ android:textAlignment="center" android:textColor="?attr/messageListThreadCountForegroundColor" android:textSize="12sp" + android:textStyle="bold" tools:text="3" /> Date: Mon, 9 May 2022 18:01:47 +0600 Subject: [PATCH 20/22] Use custom divider for messageListItem --- .../fsck/k9/fragment/MessageListAdapter.kt | 3 + .../com/fsck/k9/fragment/MessageViewHolder.kt | 1 + .../main/res/layout/message_list_fragment.xml | 1 + .../src/main/res/layout/message_list_item.xml | 352 +++++++++--------- .../src/main/res/values-night/colors.xml | 1 + app/ui/legacy/src/main/res/values/colors.xml | 1 + 6 files changed, 190 insertions(+), 169 deletions(-) diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt index 4218d07783..4b462b7ce4 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt @@ -150,8 +150,10 @@ class MessageListAdapter internal constructor( if (isInSelectionMode) { if (isSelected) { holder.selected.setImageResource(R.drawable.ic_check_circle_large) + holder.endDivider.setBackgroundResource(R.color.color_selected_divider) } else { holder.selected.setImageResource(R.drawable.ic_non_check_circle_large) + holder.endDivider.setBackgroundResource(R.color.color_default_divider) } holder.selected.isVisible = true holder.date.visibility = INVISIBLE @@ -162,6 +164,7 @@ class MessageListAdapter internal constructor( holder.selected.isVisible = false holder.date.visibility = VISIBLE holder.rightCheveron.visibility = VISIBLE + holder.endDivider.setBackgroundResource(R.color.color_default_divider) } with(message) { diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageViewHolder.kt b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageViewHolder.kt index 31ec0a8c14..a80f654b3a 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageViewHolder.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageViewHolder.kt @@ -22,4 +22,5 @@ class MessageViewHolder(view: View) { val status: ImageView = view.findViewById(R.id.status) val unreadMessageIndicator : View = view.findViewById(R.id.unread_message_indicator) val rightCheveron : View = view.findViewById(R.id.right_chevron) + val endDivider : View = view.findViewById(R.id.end_divider) } diff --git a/app/ui/legacy/src/main/res/layout/message_list_fragment.xml b/app/ui/legacy/src/main/res/layout/message_list_fragment.xml index f4baa830a9..8e7d0dd727 100644 --- a/app/ui/legacy/src/main/res/layout/message_list_fragment.xml +++ b/app/ui/legacy/src/main/res/layout/message_list_fragment.xml @@ -13,6 +13,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="5" + android:divider="@android:color/transparent" tools:listitem="@layout/message_list_item"/> diff --git a/app/ui/legacy/src/main/res/layout/message_list_item.xml b/app/ui/legacy/src/main/res/layout/message_list_item.xml index a98fdec9c4..464615f9d2 100644 --- a/app/ui/legacy/src/main/res/layout/message_list_item.xml +++ b/app/ui/legacy/src/main/res/layout/message_list_item.xml @@ -5,203 +5,217 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_vertical" - android:orientation="horizontal" + android:orientation="vertical" tools:layout_height="?android:attr/listPreferredItemHeight"> - - - - - - - - - - - - + android:orientation="horizontal"> + - - + android:layout_gravity="center_vertical" + android:layout_marginStart="13dp" + android:layout_marginTop="7dp" + android:layout_marginEnd="4dp" + android:layout_marginBottom="7dp" + android:clickable="false" + android:focusable="false" + android:focusableInTouchMode="false"> - - - + + + + + + + + + + - - - - + android:layout_below="@+id/subject_wrapper" + android:layout_alignParentStart="true" + android:layout_toStartOf="@id/extra_info_holder"> + + + + + + + + + + + + + + + + + + tools:text="Oct 27" /> - - + android:src="@drawable/ic_chevron_right_small" /> - - - - + + diff --git a/app/ui/legacy/src/main/res/values-night/colors.xml b/app/ui/legacy/src/main/res/values-night/colors.xml index 0be7eede65..e12cb4ade4 100644 --- a/app/ui/legacy/src/main/res/values-night/colors.xml +++ b/app/ui/legacy/src/main/res/values-night/colors.xml @@ -6,6 +6,7 @@ #61FFFFFF #6BFFFFFF + #470086FF #14FFFFFF #2e2e2e diff --git a/app/ui/legacy/src/main/res/values/colors.xml b/app/ui/legacy/src/main/res/values/colors.xml index 065f0f945a..04e550aa2f 100644 --- a/app/ui/legacy/src/main/res/values/colors.xml +++ b/app/ui/legacy/src/main/res/values/colors.xml @@ -27,6 +27,7 @@ #99000000 #61000000 #14212121 + #470086FF @lineageos.platform:color/color_default_gray2 #6B212121 -- GitLab From 8959d97ffb2a971b466aac78a22254f3a73446cb Mon Sep 17 00:00:00 2001 From: Fahim Salam Chowdhury Date: Mon, 9 May 2022 18:26:16 +0600 Subject: [PATCH 21/22] Update discard changes alert dialog text --- .../java/com/fsck/k9/activity/MessageCompose.java | 6 +++--- .../src/main/res/layout/recipient_alternate_item.xml | 1 + .../src/main/res/layout/recipient_dropdown_item.xml | 1 + app/ui/legacy/src/main/res/values/strings.xml | 12 ++++++------ 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageCompose.java b/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageCompose.java index 53dd04ee09..510b4e405c 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageCompose.java +++ b/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageCompose.java @@ -1141,7 +1141,7 @@ public class MessageCompose extends K9Activity implements OnClickListener, if (draftMessageId == null) { builder .setMessage(R.string.save_or_discard_draft_message_instructions_fmt) - .setNegativeButton(R.string.discard_action, new DialogInterface.OnClickListener() { + .setPositiveButton(R.string.discard_action, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int whichButton) { dismissDialog(DIALOG_SAVE_OR_DISCARD_DRAFT_MESSAGE); @@ -1151,7 +1151,7 @@ public class MessageCompose extends K9Activity implements OnClickListener, } else { builder .setMessage(R.string.save_or_discard_draft_message_changes) - .setNegativeButton(R.string.discard_action, new DialogInterface.OnClickListener() { + .setPositiveButton(R.string.discard_action, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int whichButton) { dismissDialog(DIALOG_SAVE_OR_DISCARD_DRAFT_MESSAGE); @@ -1160,7 +1160,7 @@ public class MessageCompose extends K9Activity implements OnClickListener, }); } return builder - .setPositiveButton(R.string.save_draft_action, new DialogInterface.OnClickListener() { + .setNegativeButton(R.string.cancel_action, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int whichButton) { dismissDialog(DIALOG_SAVE_OR_DISCARD_DRAFT_MESSAGE); diff --git a/app/ui/legacy/src/main/res/layout/recipient_alternate_item.xml b/app/ui/legacy/src/main/res/layout/recipient_alternate_item.xml index 0daf7d03ed..9051668d32 100644 --- a/app/ui/legacy/src/main/res/layout/recipient_alternate_item.xml +++ b/app/ui/legacy/src/main/res/layout/recipient_alternate_item.xml @@ -2,6 +2,7 @@ diff --git a/app/ui/legacy/src/main/res/values/strings.xml b/app/ui/legacy/src/main/res/values/strings.xml index 79238b2826..e6833a6059 100644 --- a/app/ui/legacy/src/main/res/values/strings.xml +++ b/app/ui/legacy/src/main/res/values/strings.xml @@ -89,7 +89,7 @@ Send… Refile… Done - Discard + DELETE Save as draft Check mail Send messages @@ -845,12 +845,12 @@ No suitable application for this action found. Send failed: %s - Save draft message? - Save or Discard this message? - Save or Discard changes? + Confirm deletion + Do you want to delete this message? + Do you want to delete this changes? - Discard message? - Are you sure you want to discard this message? + Confirm deletion + Do you want to delete this message? Select text to copy. -- GitLab From 9f60e7472088c7f59c4d67ed0e05dc66dd0b4ae1 Mon Sep 17 00:00:00 2001 From: Fahim Salam Chowdhury Date: Mon, 9 May 2022 21:52:04 +0600 Subject: [PATCH 22/22] Add /e/ licences --- .../src/main/res/values-night/colors.xml | 15 ++++++++++ app/k9mail/src/main/res/values/colors.xml | 15 ++++++++++ .../src/main/res/drawable/edittext_cursor.xml | 19 ++++++++++-- .../src/main/res/drawable/ic_arrow_back.xml | 15 ++++++++++ .../base/src/main/res/values-night/colors.xml | 15 ++++++++++ app/ui/base/src/main/res/values/colors.xml | 15 ++++++++++ app/ui/legacy/src/debug/res/values/colors.xml | 15 ++++++++++ .../fsck/k9/fragment/MessageListFragment.kt | 2 +- .../ui/settings/CustomPreferenceCategory.java | 18 +++++++++++- .../main/res/drawable/bg_recipient_token.xml | 15 ++++++++++ .../src/main/res/drawable/edittext_cursor.xml | 15 ++++++++++ .../main/res/drawable/ic_add_attachment.xml | 15 ++++++++++ .../main/res/drawable/ic_alert_octagon.xml | 22 +++++++------- .../res/drawable/ic_alert_octagon_default.xml | 15 ++++++++++ .../drawable/ic_alert_octagon_selected.xml | 15 ++++++++++ .../src/main/res/drawable/ic_archive.xml | 22 +++++++------- .../main/res/drawable/ic_archive_default.xml | 15 ++++++++++ .../main/res/drawable/ic_archive_selected.xml | 15 ++++++++++ .../src/main/res/drawable/ic_arrow_back.xml | 15 ++++++++++ .../main/res/drawable/ic_arrow_up_down.xml | 15 ++++++++++ .../src/main/res/drawable/ic_attachment.xml | 15 ++++++++++ .../res/drawable/ic_attachment_generic.xml | 15 ++++++++++ .../main/res/drawable/ic_attachment_image.xml | 15 ++++++++++ .../src/main/res/drawable/ic_avatar.xml | 22 +++++++------- .../main/res/drawable/ic_avatar_default.xml | 15 ++++++++++ .../main/res/drawable/ic_avatar_selected.xml | 15 ++++++++++ .../res/drawable/ic_chevron_right_small.xml | 15 ++++++++++ .../res/drawable/ic_create_new_folder.xml | 15 ++++++++++ .../main/res/drawable/ic_drafts_folder.xml | 22 +++++++------- .../res/drawable/ic_drafts_folder_default.xml | 15 ++++++++++ .../drawable/ic_drafts_folder_selected.xml | 15 ++++++++++ .../src/main/res/drawable/ic_folder.xml | 22 +++++++------- .../main/res/drawable/ic_folder_default.xml | 15 ++++++++++ .../main/res/drawable/ic_folder_selected.xml | 15 ++++++++++ .../src/main/res/drawable/ic_hamburger.xml | 15 ++++++++++ .../legacy/src/main/res/drawable/ic_inbox.xml | 22 +++++++------- .../main/res/drawable/ic_inbox_default.xml | 15 ++++++++++ .../main/res/drawable/ic_inbox_multiple.xml | 22 +++++++------- .../drawable/ic_inbox_multiple_default.xml | 15 ++++++++++ .../drawable/ic_inbox_multiple_selected.xml | 15 ++++++++++ .../main/res/drawable/ic_inbox_selected.xml | 15 ++++++++++ .../src/main/res/drawable/ic_outbox.xml | 22 +++++++------- .../main/res/drawable/ic_outbox_default.xml | 15 ++++++++++ .../main/res/drawable/ic_outbox_selected.xml | 15 ++++++++++ .../legacy/src/main/res/drawable/ic_send.xml | 22 +++++++------- .../src/main/res/drawable/ic_send_default.xml | 15 ++++++++++ .../main/res/drawable/ic_send_selected.xml | 15 ++++++++++ .../legacy/src/main/res/drawable/ic_star.xml | 15 ++++++++++ .../src/main/res/drawable/ic_star_24dp.xml | 15 ++++++++++ .../src/main/res/drawable/ic_star_border.xml | 15 ++++++++++ .../main/res/drawable/ic_star_border_24dp.xml | 15 ++++++++++ .../src/main/res/drawable/ic_trash_can.xml | 22 +++++++------- .../res/drawable/ic_trash_can_default.xml | 15 ++++++++++ .../res/drawable/ic_trash_can_selected.xml | 15 ++++++++++ .../main/res/drawable/ic_unread_message.xml | 15 ++++++++++ .../res/drawable/thread_count_box_dark.xml | 26 +++++++++++++---- .../res/drawable/thread_count_box_light.xml | 15 ++++++++++ .../src/main/res/layout/custom_preference.xml | 29 +++++++++---------- .../res/layout/custom_seekbar_preference.xml | 29 +++++++++---------- .../res/layout/drawer_footer_list_item.xml | 15 ++++++++++ .../src/main/res/values-night/colors.xml | 15 ++++++++++ app/ui/legacy/src/main/res/values/colors.xml | 15 ++++++++++ 62 files changed, 883 insertions(+), 150 deletions(-) diff --git a/app/k9mail/src/main/res/values-night/colors.xml b/app/k9mail/src/main/res/values-night/colors.xml index a92111f554..9eb56540cc 100644 --- a/app/k9mail/src/main/res/values-night/colors.xml +++ b/app/k9mail/src/main/res/values-night/colors.xml @@ -1,4 +1,19 @@ + + #121212 #2F2F2F diff --git a/app/k9mail/src/main/res/values/colors.xml b/app/k9mail/src/main/res/values/colors.xml index a6b43eecef..2ae4f8e804 100644 --- a/app/k9mail/src/main/res/values/colors.xml +++ b/app/k9mail/src/main/res/values/colors.xml @@ -1,4 +1,19 @@ + + @lineageos.platform:color/color_default_primary @lineageos.platform:color/color_default_primary_dark diff --git a/app/ui/base/src/main/res/drawable/edittext_cursor.xml b/app/ui/base/src/main/res/drawable/edittext_cursor.xml index 8f3f1ae237..bc3ba972d3 100644 --- a/app/ui/base/src/main/res/drawable/edittext_cursor.xml +++ b/app/ui/base/src/main/res/drawable/edittext_cursor.xml @@ -1,5 +1,20 @@ - + + + - + diff --git a/app/ui/base/src/main/res/drawable/ic_arrow_back.xml b/app/ui/base/src/main/res/drawable/ic_arrow_back.xml index 3704179240..4ee8f72dd7 100644 --- a/app/ui/base/src/main/res/drawable/ic_arrow_back.xml +++ b/app/ui/base/src/main/res/drawable/ic_arrow_back.xml @@ -1,3 +1,18 @@ + + + + #121212 #DEFFFFFF diff --git a/app/ui/base/src/main/res/values/colors.xml b/app/ui/base/src/main/res/values/colors.xml index 5eaa8403b3..c0877b8880 100644 --- a/app/ui/base/src/main/res/values/colors.xml +++ b/app/ui/base/src/main/res/values/colors.xml @@ -1,4 +1,19 @@ + + @color/color_default_secondary_text diff --git a/app/ui/legacy/src/debug/res/values/colors.xml b/app/ui/legacy/src/debug/res/values/colors.xml index 109450a4a7..f80243d09f 100644 --- a/app/ui/legacy/src/debug/res/values/colors.xml +++ b/app/ui/legacy/src/debug/res/values/colors.xml @@ -1,4 +1,19 @@ + + #E4D9FF diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.kt b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.kt index 90bf019f1a..4a7898fdca 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.kt @@ -354,7 +354,7 @@ class MessageListFragment : } val subtitle = account.let { account -> - if (account == null || isUnifiedInbox || preferences.accounts.size == 1) { + if (account == null || isUnifiedInbox) { null } else { var name = account.displayName diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/CustomPreferenceCategory.java b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/CustomPreferenceCategory.java index 4a901616b5..fd0c2b96c9 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/CustomPreferenceCategory.java +++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/CustomPreferenceCategory.java @@ -1,5 +1,21 @@ -package com.fsck.k9.ui.settings; +/* + * Copyright (C) 2022 E FOUNDATION + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.fsck.k9.ui.settings; import android.content.Context; import android.graphics.Typeface; diff --git a/app/ui/legacy/src/main/res/drawable/bg_recipient_token.xml b/app/ui/legacy/src/main/res/drawable/bg_recipient_token.xml index ec48cf744f..2f64563e09 100644 --- a/app/ui/legacy/src/main/res/drawable/bg_recipient_token.xml +++ b/app/ui/legacy/src/main/res/drawable/bg_recipient_token.xml @@ -1,4 +1,19 @@ + + + + diff --git a/app/ui/legacy/src/main/res/drawable/ic_add_attachment.xml b/app/ui/legacy/src/main/res/drawable/ic_add_attachment.xml index 2297689e06..ae3c64a745 100644 --- a/app/ui/legacy/src/main/res/drawable/ic_add_attachment.xml +++ b/app/ui/legacy/src/main/res/drawable/ic_add_attachment.xml @@ -1,4 +1,19 @@ + + - diff --git a/app/ui/legacy/src/main/res/drawable/ic_alert_octagon_default.xml b/app/ui/legacy/src/main/res/drawable/ic_alert_octagon_default.xml index 5f7932dc83..3f7a60cd4c 100644 --- a/app/ui/legacy/src/main/res/drawable/ic_alert_octagon_default.xml +++ b/app/ui/legacy/src/main/res/drawable/ic_alert_octagon_default.xml @@ -1,4 +1,19 @@ + + + + - diff --git a/app/ui/legacy/src/main/res/drawable/ic_archive_default.xml b/app/ui/legacy/src/main/res/drawable/ic_archive_default.xml index 2084e35242..61c5b30dac 100644 --- a/app/ui/legacy/src/main/res/drawable/ic_archive_default.xml +++ b/app/ui/legacy/src/main/res/drawable/ic_archive_default.xml @@ -1,4 +1,19 @@ + + + + . +--> + . +--> + . +--> + . +--> + . +--> + - diff --git a/app/ui/legacy/src/main/res/drawable/ic_avatar_default.xml b/app/ui/legacy/src/main/res/drawable/ic_avatar_default.xml index 00b7012ec7..1b65a688ad 100644 --- a/app/ui/legacy/src/main/res/drawable/ic_avatar_default.xml +++ b/app/ui/legacy/src/main/res/drawable/ic_avatar_default.xml @@ -1,3 +1,18 @@ + + . +--> + + + . +--> + - diff --git a/app/ui/legacy/src/main/res/drawable/ic_drafts_folder_default.xml b/app/ui/legacy/src/main/res/drawable/ic_drafts_folder_default.xml index 6c1178307a..97837bcd7f 100644 --- a/app/ui/legacy/src/main/res/drawable/ic_drafts_folder_default.xml +++ b/app/ui/legacy/src/main/res/drawable/ic_drafts_folder_default.xml @@ -1,4 +1,19 @@ + + + + - diff --git a/app/ui/legacy/src/main/res/drawable/ic_folder_default.xml b/app/ui/legacy/src/main/res/drawable/ic_folder_default.xml index cb5006c23f..a6f229864d 100644 --- a/app/ui/legacy/src/main/res/drawable/ic_folder_default.xml +++ b/app/ui/legacy/src/main/res/drawable/ic_folder_default.xml @@ -1,4 +1,19 @@ + + + + + + - diff --git a/app/ui/legacy/src/main/res/drawable/ic_inbox_default.xml b/app/ui/legacy/src/main/res/drawable/ic_inbox_default.xml index 680c06eaaa..21063291bc 100644 --- a/app/ui/legacy/src/main/res/drawable/ic_inbox_default.xml +++ b/app/ui/legacy/src/main/res/drawable/ic_inbox_default.xml @@ -1,4 +1,19 @@ + + - diff --git a/app/ui/legacy/src/main/res/drawable/ic_inbox_multiple_default.xml b/app/ui/legacy/src/main/res/drawable/ic_inbox_multiple_default.xml index b66dd11feb..c6269ee5ed 100644 --- a/app/ui/legacy/src/main/res/drawable/ic_inbox_multiple_default.xml +++ b/app/ui/legacy/src/main/res/drawable/ic_inbox_multiple_default.xml @@ -1,4 +1,19 @@ + + + + + + - diff --git a/app/ui/legacy/src/main/res/drawable/ic_outbox_default.xml b/app/ui/legacy/src/main/res/drawable/ic_outbox_default.xml index d618ab2d64..6a44f076b9 100644 --- a/app/ui/legacy/src/main/res/drawable/ic_outbox_default.xml +++ b/app/ui/legacy/src/main/res/drawable/ic_outbox_default.xml @@ -1,4 +1,19 @@ + + + + - diff --git a/app/ui/legacy/src/main/res/drawable/ic_send_default.xml b/app/ui/legacy/src/main/res/drawable/ic_send_default.xml index 1b6a78dc86..3ae236a145 100644 --- a/app/ui/legacy/src/main/res/drawable/ic_send_default.xml +++ b/app/ui/legacy/src/main/res/drawable/ic_send_default.xml @@ -1,4 +1,19 @@ + + + + . +--> + . +--> + . +--> + . +--> + - diff --git a/app/ui/legacy/src/main/res/drawable/ic_trash_can_default.xml b/app/ui/legacy/src/main/res/drawable/ic_trash_can_default.xml index 53866c3e29..7679c9b224 100644 --- a/app/ui/legacy/src/main/res/drawable/ic_trash_can_default.xml +++ b/app/ui/legacy/src/main/res/drawable/ic_trash_can_default.xml @@ -1,4 +1,19 @@ + + + + + + diff --git a/app/ui/legacy/src/main/res/drawable/thread_count_box_dark.xml b/app/ui/legacy/src/main/res/drawable/thread_count_box_dark.xml index c9e4db53a8..5609a3dc88 100644 --- a/app/ui/legacy/src/main/res/drawable/thread_count_box_dark.xml +++ b/app/ui/legacy/src/main/res/drawable/thread_count_box_dark.xml @@ -1,10 +1,24 @@ - + - + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +--> + + + + diff --git a/app/ui/legacy/src/main/res/drawable/thread_count_box_light.xml b/app/ui/legacy/src/main/res/drawable/thread_count_box_light.xml index b059365b53..5609a3dc88 100644 --- a/app/ui/legacy/src/main/res/drawable/thread_count_box_light.xml +++ b/app/ui/legacy/src/main/res/drawable/thread_count_box_light.xml @@ -1,4 +1,19 @@ + + - + - + + + + + #121212 #DEFFFFFF diff --git a/app/ui/legacy/src/main/res/values/colors.xml b/app/ui/legacy/src/main/res/values/colors.xml index 04e550aa2f..27a0f0bdc0 100644 --- a/app/ui/legacy/src/main/res/values/colors.xml +++ b/app/ui/legacy/src/main/res/values/colors.xml @@ -1,4 +1,19 @@ + + #FFDAE1 -- GitLab