Fix trash & archive page

This commit is contained in:
Neeraj Gupta 2022-05-03 15:47:13 +05:30
parent d9a31f7945
commit e6816cd6ef
No known key found for this signature in database
GPG key ID: 3C5A1684DC1729E1
3 changed files with 10 additions and 10 deletions

View file

@ -54,7 +54,7 @@ class ArchivePage extends StatelessWidget {
preferredSize: Size.fromHeight(50.0),
child: GalleryAppBarWidget(
appBarType,
"archive",
"Hidden",
_selectedFiles,
),
),

View file

@ -41,10 +41,13 @@ class ThumbnailWidget extends StatefulWidget {
_ThumbnailWidgetState createState() => _ThumbnailWidgetState();
}
Widget getFileInfoContainer(File file) {
Widget getFileInfoContainer(BuildContext context, File file) {
if (file is TrashFile) {
return Container(
child: Text(daysLeft(file.deleteBy)),
child: Text(
daysLeft(file.deleteBy),
style: TextStyle(color: Colors.white),
),
alignment: Alignment.bottomCenter,
padding: EdgeInsets.fromLTRB(0, 0, 0, 5),
);
@ -196,7 +199,7 @@ class _ThumbnailWidgetState extends State<ThumbnailWidget> {
),
widget.shouldShowSyncStatus && widget.file.uploadedFileID == null
? kUnsyncedIconOverlay
: getFileInfoContainer(widget.file),
: getFileInfoContainer(context, widget.file),
];
if (widget.shouldShowArchiveStatus) {
viewChildrens.add(kArchiveIconOverlay);

View file

@ -49,7 +49,7 @@ class TrashPage extends StatelessWidget {
preferredSize: Size.fromHeight(50.0),
child: GalleryAppBarWidget(
appBarType,
"trash",
"Trash",
_selectedFiles,
),
),
@ -65,11 +65,8 @@ class TrashPage extends StatelessWidget {
return Padding(
padding: EdgeInsets.all(16),
child: Text(
'items show the number the days remaining before permanent deletion',
style: TextStyle(
fontSize: 16,
color: Colors.white.withOpacity(0.6),
),
'Items show the number the days remaining before permanent deletion',
style: Theme.of(context).textTheme.caption.copyWith(fontSize: 16),
),
);
} else {