Skip to content

Commit 68d40f9

Browse files
committed
Merge remote-tracking branch 'origin/develop' into Gradle-KotlinDSL-Migration
2 parents b7aae2e + 9702a70 commit 68d40f9

8 files changed

Lines changed: 186 additions & 151 deletions

File tree

.fvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"flutter": "3.27.4"
2+
"flutter": "3.32.4"
33
}

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
/.flutter-plugins
66
/.flutter-plugins-dependencies
77
/.packages
8-
98
*.env
109

10+
# May be temporary
11+
devtools_options.yaml
12+
1113
# FVM Version Cache
1214
.fvm/
1315
/.dart_tool/

lib/models/image_model.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class ImageModel {
4848
dateCreation = json['date_creation'],
4949
dateAvailable = json['date_available'],
5050
pageUrl = json['page_url'],
51-
elementUrl = json['element_url'],
51+
elementUrl = json.containsKey("element_url") ? json['element_url'] : "",
5252
derivatives = Derivatives.fromJson(json['derivatives']),
5353
categories = json['categories'] ?? [],
5454
tags = json['tags']

lib/network/images.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ Future<bool> share(
246246
print(filesPath);
247247
if (filesPath == null || filesPath.isEmpty) return false;
248248
try {
249-
Share.shareXFiles(filesPath);
249+
SharePlus.instance.share(ShareParams(files: filesPath));
250250
return true;
251251
} catch (e) {
252252
debugPrint("$e");

lib/utils/themes.dart

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ final ThemeData lightTheme = ThemeData.light(useMaterial3: true).copyWith(
77
primaryColorDark: AppColors.black,
88
disabledColor: AppColors.disabled,
99
scaffoldBackgroundColor: AppColors.backgroundLight,
10-
dialogBackgroundColor: AppColors.backgroundLight,
1110
focusColor: AppColors.accent,
1211
splashColor: AppColors.accent.withValues(alpha: 0.3),
1312
cardColor: AppColors.cardLight,
@@ -40,7 +39,7 @@ final ThemeData lightTheme = ThemeData.light(useMaterial3: true).copyWith(
4039
foregroundColor: AppColors.accent,
4140
titleTextStyle: TextStyle(fontSize: 20.0, color: AppColors.black),
4241
),
43-
tabBarTheme: TabBarTheme(
42+
tabBarTheme: TabBarThemeData(
4443
dividerColor: Colors.transparent,
4544
labelStyle: TextStyle(
4645
fontSize: 16,
@@ -169,7 +168,7 @@ final ThemeData lightTheme = ThemeData.light(useMaterial3: true).copyWith(
169168
color: AppColors.black,
170169
fontWeight: FontWeight.normal,
171170
),
172-
),
171+
), dialogTheme: DialogThemeData(backgroundColor: AppColors.backgroundLight),
173172
);
174173

175174
final ThemeData darkTheme = ThemeData.dark(useMaterial3: true).copyWith(
@@ -178,7 +177,6 @@ final ThemeData darkTheme = ThemeData.dark(useMaterial3: true).copyWith(
178177
primaryColorDark: AppColors.black,
179178
disabledColor: AppColors.disabled,
180179
scaffoldBackgroundColor: AppColors.backgroundDark,
181-
dialogBackgroundColor: AppColors.backgroundDark,
182180
focusColor: AppColors.accent,
183181
splashColor: AppColors.accent.withValues(alpha: 0.3),
184182
cardColor: AppColors.cardDark,
@@ -211,7 +209,7 @@ final ThemeData darkTheme = ThemeData.dark(useMaterial3: true).copyWith(
211209
foregroundColor: AppColors.accent,
212210
titleTextStyle: TextStyle(fontSize: 20.0, color: AppColors.white),
213211
),
214-
tabBarTheme: TabBarTheme(
212+
tabBarTheme: TabBarThemeData(
215213
dividerColor: Colors.transparent,
216214
labelStyle: TextStyle(
217215
fontSize: 16,
@@ -329,5 +327,5 @@ final ThemeData darkTheme = ThemeData.dark(useMaterial3: true).copyWith(
329327
color: AppColors.white,
330328
fontWeight: FontWeight.bold,
331329
),
332-
),
330+
), dialogTheme: DialogThemeData(backgroundColor: AppColors.backgroundDark),
333331
);

lib/views/image/image_page.dart

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -480,9 +480,8 @@ class _ImagePageState extends State<ImagePage> {
480480
builder: (context, index) {
481481
final ImageModel image = _imageList[index];
482482

483-
String imageUrl = '';
484-
if (Preferences.getImageFullScreenSize == 'full') {
485-
imageUrl = image.elementUrl;
483+
String imageUrl = image.elementUrl;
484+
if (Preferences.getImageFullScreenSize == 'full' && imageUrl.isNotEmpty) {
486485
imageUrl = HtmlUnescape().convert(imageUrl);
487486
} else {
488487
imageUrl = image.getDerivativeFromString(Preferences.getImageFullScreenSize)?.url ?? '';
@@ -709,10 +708,12 @@ class _ImagePageState extends State<ImagePage> {
709708
},
710709
),
711710
),
712-
IconButton(
713-
onPressed: () => downloadImages([_currentImage]),
714-
icon: Icon(Icons.download),
715-
),
711+
if (_currentImage.elementUrl != "")
712+
IconButton(
713+
onPressed: () => downloadImages([_currentImage]),
714+
icon: Icon(Icons.download),
715+
)
716+
,
716717
];
717718

718719
return widget.isAdmin ? adminActions : userActions;

0 commit comments

Comments
 (0)