didvanplus → open the video player directly with link
This commit is contained in:
parent
b793cb2a4b
commit
7710b5cab8
|
|
@ -312,7 +312,24 @@ class HomeWidgetRepository {
|
|||
break;
|
||||
|
||||
case 'didvanplus':
|
||||
route = Routes.didvanPlusList;
|
||||
// Open the player directly. We don't have a full DidvanPlusModel
|
||||
// here (no record in the legacy DB), so we synthesize one from
|
||||
// the notification payload — the player only reads file/image/
|
||||
// title/description.
|
||||
if (localData.link != null && localData.link!.isNotEmpty) {
|
||||
route = Routes.didvanPlusVideo;
|
||||
args = DidvanPlusModel(
|
||||
id: 0, // unused for navigation
|
||||
title: localData.title ?? '',
|
||||
description: localData.body ?? '',
|
||||
image: localData.imageUrl ?? '',
|
||||
file: localData.link!,
|
||||
publishedAt: DateTime.now().toIso8601String(),
|
||||
);
|
||||
} else {
|
||||
// Fallback: no video URL → just show the list.
|
||||
route = Routes.didvanPlusList;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'didvanvoice':
|
||||
|
|
|
|||
Loading…
Reference in New Issue