Skip to content

Commit

Permalink
Merge pull request #1520 from wolfsolver/master
Browse files Browse the repository at this point in the history
Issue #1518 and #1519
  • Loading branch information
guanlisheng authored Jan 14, 2024
2 parents 4f9ac58 + ce39689 commit 9b5fc0d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class QueryAllData
// public static final String FromAccountId = "FromAccountId";
// public static final String FromAmount = "FromAmount";
// public static final String FromCurrencyId = "FromCurrencyId";
public static final String SPLITTED = "Splitted";
public static final String SPLITTED = "SPLITTED";
public static final String ParentCategID = "ParentCategID";
public static final String CategID = "CategID";
public static final String SubcategID = "SubcategID";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/
package com.money.manager.ex.notifications;

import android.annotation.SuppressLint;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
Expand Down Expand Up @@ -89,7 +90,7 @@ private void showNotification(SyncNotificationModel model) {
// set launch from notification // check pin code
intent.putExtra(RecurringTransactionListActivity.INTENT_EXTRA_LAUNCH_NOTIFICATION, true);

PendingIntent pendingIntent = PendingIntent.getActivity(getContext(), 0, intent, 0);
PendingIntent pendingIntent = PendingIntent.getActivity(getContext(), 0, intent, PendingIntent.FLAG_IMMUTABLE);

// todo: Actions
// Intent skipIntent = new Intent(intent);
Expand Down Expand Up @@ -126,6 +127,7 @@ private void showNotification(SyncNotificationModel model) {
}
}

@SuppressLint("Range")
private SyncNotificationModel getNotificationContent(Cursor cursor) {
SyncNotificationModel result = new SyncNotificationModel();

Expand All @@ -134,7 +136,7 @@ private SyncNotificationModel getNotificationContent(Cursor cursor) {
CurrencyService currencyService = new CurrencyService(mContext);

while (cursor.moveToNext()) {
String payeeName = cursor.getString(cursor.getColumnIndex(QueryBillDeposits.PAYEENAME));
@SuppressLint("Range") String payeeName = cursor.getString(cursor.getColumnIndex(QueryBillDeposits.PAYEENAME));
// check if payee name is null, then put toAccountName
if (TextUtils.isEmpty(payeeName))
payeeName = cursor.getString(cursor.getColumnIndex(QueryBillDeposits.TOACCOUNTNAME));
Expand Down

0 comments on commit 9b5fc0d

Please sign in to comment.