Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6520f3ac authored by cketti's avatar cketti Committed by GitHub
Browse files

Merge pull request #2322 from philipwhiuk/fix1418

Display subject correctly in expanded notifications
parents e601cb2f 4eb431b1
Loading
Loading
Loading
Loading
+1 −17
Original line number Diff line number Diff line
@@ -4,8 +4,6 @@ package com.fsck.k9.notification;
import android.content.Context;
import android.text.SpannableStringBuilder;
import android.text.TextUtils;
import android.text.style.TextAppearanceSpan;
import timber.log.Timber;

import com.fsck.k9.Account;
import com.fsck.k9.K9;
@@ -16,14 +14,12 @@ import com.fsck.k9.helper.MessageHelper;
import com.fsck.k9.mail.Address;
import com.fsck.k9.mail.Flag;
import com.fsck.k9.mail.Message;
import com.fsck.k9.mail.MessagingException;
import com.fsck.k9.mailstore.LocalMessage;
import com.fsck.k9.message.extractors.PreviewResult.PreviewType;


class NotificationContentCreator {
    private final Context context;
    private TextAppearanceSpan emphasizedSpan;


    public NotificationContentCreator(Context context) {
@@ -61,8 +57,6 @@ class NotificationContentCreator {
            preview.append(snippet);
        }
        
        preview.setSpan(getEmphasizedSpan(), 0, displaySubject.length(), 0);

        return preview;
    }

@@ -91,8 +85,6 @@ class NotificationContentCreator {
        summary.append(" ");
        summary.append(subject);

        summary.setSpan(getEmphasizedSpan(), 0, sender.length(), 0);

        return summary;
    }

@@ -133,12 +125,4 @@ class NotificationContentCreator {
    private String getMessageSenderForDisplay(String sender) {
        return (sender != null) ? sender : context.getString(R.string.general_no_sender);
    }

    private TextAppearanceSpan getEmphasizedSpan() {
        if (emphasizedSpan == null) {
            emphasizedSpan = new TextAppearanceSpan(context,
                    R.style.TextAppearance_StatusBar_EventContent_Emphasized);
        }
        return emphasizedSpan;
    }
}
+0 −6
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="TextAppearance.StatusBar.EventContent.Emphasized" parent="@android:style/TextAppearance.StatusBar.EventContent">
        <item name="android:textColor">?android:textColorPrimaryInverse</item>
    </style>
</resources>
+0 −4
Original line number Diff line number Diff line
@@ -18,10 +18,6 @@
        <item name="android:textColor">@android:color/primary_text_light</item>
    </style>

    <style name="TextAppearance.StatusBar.EventContent.Emphasized" parent="@android:style/TextAppearance.StatusBar.EventContent">
        <item name="android:textColor">#cccccc</item>
    </style>

    <style name="UnreadWidgetContainer">
        <item name="android:paddingTop">0dp</item>
        <item name="android:paddingLeft">0dp</item>