mirror of
https://github.com/mihonapp/mihon.git
synced 2025-03-13 16:20:08 +01:00
Apply suggestions from code review
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com> Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
This commit is contained in:
parent
980874b260
commit
84ff6efd1c
@ -86,7 +86,6 @@ internal class DownloadNotifier(private val context: Context) {
|
||||
addAction(
|
||||
R.drawable.ic_book_24dp,
|
||||
context.stringResource(MR.strings.action_show_manga),
|
||||
|
||||
NotificationReceiver.openEntryPendingActivity(context, download.manga.id),
|
||||
)
|
||||
}
|
||||
@ -181,7 +180,6 @@ internal class DownloadNotifier(private val context: Context) {
|
||||
addAction(
|
||||
R.drawable.ic_book_24dp,
|
||||
context.stringResource(MR.strings.action_show_manga),
|
||||
|
||||
NotificationReceiver.openEntryPendingActivity(context, mangaId),
|
||||
)
|
||||
}
|
||||
@ -218,7 +216,6 @@ internal class DownloadNotifier(private val context: Context) {
|
||||
addAction(
|
||||
R.drawable.ic_book_24dp,
|
||||
context.stringResource(MR.strings.action_show_manga),
|
||||
|
||||
NotificationReceiver.openEntryPendingActivity(context, mangaId),
|
||||
)
|
||||
}
|
||||
|
@ -493,11 +493,11 @@ class NotificationReceiver : BroadcastReceiver() {
|
||||
* @param mangaId id of the entry to open
|
||||
*/
|
||||
internal fun openEntryPendingActivity(context: Context, mangaId: Long): PendingIntent {
|
||||
val newIntent =
|
||||
Intent(context, MainActivity::class.java).setAction(Constants.SHORTCUT_MANGA)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
|
||||
.putExtra(Constants.MANGA_EXTRA, mangaId)
|
||||
.putExtra("notificationId", mangaId.hashCode())
|
||||
val newIntent = Intent(context, MainActivity::class.java).setAction(Constants.SHORTCUT_MANGA)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
|
||||
.putExtra(Constants.MANGA_EXTRA, mangaId)
|
||||
.putExtra("notificationId", mangaId.hashCode())
|
||||
|
||||
return PendingIntent.getActivity(
|
||||
context,
|
||||
mangaId.hashCode(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user