mirror of
https://github.com/jagandeepbrar/lunasea.git
synced 2026-08-31 04:32:32 +00:00
NEW - [Webhooks] Show series, movie, or artist cover photos in incoming system notifications - [Webhooks/Radarr] Jump directly into the content by tapping the notification - [Webhooks/Sonarr] Jump directly into the content by tapping the notification - [-arr/Details] Added a button to the AppBar to jump directly into the edit page TWEAKS - [Radarr/Files] Moved the video block above the audio block FIXES - [AppBar/Dropdown] Vertical padding around title when the profile dropdown is visible was incorrect - [Radarr/Details] If the movie was not found, it would show an infinite loader, now shows a "No Movies Found" message - [Radarr/Releases] Changing the sorting or filter method would not scroll the list back to the top
70 lines
2.2 KiB
Dart
70 lines
2.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:lunasea/core.dart';
|
|
import 'package:lunasea/modules/lidarr.dart';
|
|
|
|
class LidarrHistoryTile extends StatefulWidget {
|
|
final LidarrHistoryData entry;
|
|
final GlobalKey<ScaffoldState> scaffoldKey;
|
|
final Function refresh;
|
|
|
|
LidarrHistoryTile({
|
|
@required this.entry,
|
|
@required this.scaffoldKey,
|
|
@required this.refresh,
|
|
});
|
|
|
|
@override
|
|
State<LidarrHistoryTile> createState() => _State();
|
|
}
|
|
|
|
class _State extends State<LidarrHistoryTile> {
|
|
@override
|
|
Widget build(BuildContext context) => LSCardTile(
|
|
title: LSTitle(text: widget.entry.title),
|
|
subtitle: RichText(
|
|
text: TextSpan(
|
|
style: TextStyle(
|
|
color: Colors.white70,
|
|
fontSize: Constants.UI_FONT_SIZE_SUBTITLE,
|
|
),
|
|
children: widget.entry.subtitle,
|
|
),
|
|
),
|
|
trailing: LSIconButton(
|
|
icon: Icons.arrow_forward_ios_rounded,
|
|
),
|
|
padContent: true,
|
|
onTap: () async => _enterArtist(),
|
|
);
|
|
|
|
Future<void> _enterArtist() async {
|
|
if(widget.entry.artistID == null || widget.entry.artistID == -1) {
|
|
LSSnackBar(
|
|
context: context,
|
|
title: 'No Artist Available',
|
|
message: 'There is no artist associated with this history entry',
|
|
);
|
|
} else {
|
|
final dynamic result = await Navigator.of(context).pushNamed(
|
|
LidarrDetailsArtist.ROUTE_NAME,
|
|
arguments: LidarrDetailsArtistArguments(
|
|
data: null,
|
|
artistID: widget.entry.artistID,
|
|
),
|
|
);
|
|
if(result != null) switch(result[0]) {
|
|
case 'remove_artist': {
|
|
LSSnackBar(
|
|
context: context,
|
|
title: result[1] ? 'Removed (With Data)' : 'Removed',
|
|
message: 'Removed artist with ID ${widget.entry.artistID}',
|
|
type: SNACKBAR_TYPE.success,
|
|
);
|
|
widget.refresh();
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|