Skip to content

Commit d85d25e

Browse files
committed
fixed upload notifications
1 parent edc6863 commit d85d25e

4 files changed

Lines changed: 3 additions & 8 deletions

File tree

lib/api/albums.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ Future<ApiResult<List<AlbumModel>>> fetchAlbums(int albumID) async {
4747
queryParameters: queries,
4848
);
4949

50-
debugPrint('hello');
51-
debugPrint(response.data.toString());
52-
5350
if (response.statusCode == 200) {
5451
List<dynamic> jsonAlbums = tryParseJson(response.data)['result']['categories'];
5552
List<AlbumModel> albums = List<AlbumModel>.from(jsonAlbums.map(

lib/api/upload.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import '../services/chunked_uploader.dart';
2323
import '../services/notification_service.dart';
2424

2525
Future<void> _showUploadNotification({bool success = true}) async {
26-
if (!(appPreferences.getBool('upload_notification') ?? true)) return;
2726
final android = AndroidNotificationDetails(
2827
'piwigo-ng-upload',
2928
'Piwigo NG Upload',
@@ -221,6 +220,7 @@ Future<bool> uploadCompleted(List<int> imageId, int categoryId) async {
221220
'pwg_token': appPreferences.getString(Preferences.tokenKey),
222221
'category_id': categoryId,
223222
});
223+
224224
try {
225225
Response response = await ApiClient.post(data: formData, queryParameters: queries);
226226
if (response.statusCode == 200) {

lib/components/cards/album_card.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ class AlbumCardContent extends StatelessWidget {
244244
children: [
245245
Text(
246246
album.name,
247+
textAlign: TextAlign.center,
247248
softWrap: true,
248249
maxLines: 2,
249250
overflow: TextOverflow.ellipsis,

lib/services/chunked_uploader.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,12 @@ class ChunkedUploader {
2121
required int maxChunkSize,
2222
required Function(double) onUploadProgress,
2323
String method = 'POST',
24-
String fileKey = 'file',
2524
}) =>
2625
UploadRequest(_dio,
2726
filePath: filePath,
2827
path: path,
2928
contentType: contentType,
3029
params: params,
31-
fileKey: fileKey,
3230
method: method,
3331
data: data,
3432
cancelToken: cancelToken,
@@ -39,7 +37,7 @@ class ChunkedUploader {
3937

4038
class UploadRequest {
4139
final Dio dio;
42-
final String filePath, fileName, path, fileKey;
40+
final String filePath, fileName, path;
4341
final Map<String, String> params;
4442
final String method;
4543
final String contentType;
@@ -55,7 +53,6 @@ class UploadRequest {
5553
required this.params,
5654
required this.contentType,
5755
required this.path,
58-
required this.fileKey,
5956
required this.method,
6057
required this.data,
6158
this.cancelToken,

0 commit comments

Comments
 (0)