Skip to content

Commit

Permalink
V0.3.6 (#108)
Browse files Browse the repository at this point in the history
* bug fixed

* bug fixes

* version update
  • Loading branch information
DattatreyaReddy authored Feb 1, 2023
1 parent 6f8d4bf commit 2ce5a1a
Show file tree
Hide file tree
Showing 14 changed files with 69 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
import '../../../../../constants/db_keys.dart';
import '../../../../../constants/enum.dart';
import '../../../../../i18n/locale_keys.g.dart';
import '../../../../../widgets/list_popup.dart';
import '../../../../../widgets/radio_list_popup.dart';
import '../controller/source_manga_controller.dart';

class SourceMangaDisplayIconPopup extends ConsumerWidget {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import '../../../../../constants/enum.dart';
import '../../../../../i18n/locale_keys.g.dart';
import '../../../../../utils/extensions/custom_extensions.dart';
import '../../../../../widgets/custom_checkbox_list_tile.dart';
import '../../../../../widgets/list_popup.dart';
import '../../../../../widgets/manga_cover/providers/manga_cover_providers.dart';
import '../../../../../widgets/radio_list_popup.dart';
import '../controller/library_controller.dart';

class LibraryMangaDisplay extends ConsumerWidget {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class PageNumberSlider extends StatelessWidget {
value: min(currentValue.toDouble(), maxValue.toDouble()),
min: 0,
max: maxValue.toDouble() - 1,
divisions: max(maxValue, 1) - 1,
divisions: max(maxValue - 1, 1),
onChanged: (val) => onChanged(val.toInt()),
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import '../../../../../constants/enum.dart';
import '../../../../../i18n/locale_keys.g.dart';
import '../../../../../routes/router_config.dart';
import '../../../../../utils/extensions/custom_extensions.dart';
import '../../../../../widgets/list_popup.dart';
import '../../../../../widgets/radio_list_popup.dart';
import '../../../data/manga_book_repository.dart';
import '../../../domain/chapter/chapter_model.dart';
import '../../../domain/chapter_patch/chapter_put_model.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,61 +34,65 @@ class ChapterMangaListTile extends StatelessWidget {
@override
Widget build(BuildContext context) {
final color = (pair.chapter?.read).ifNull() ? Colors.grey : null;
return ListTile(
title: Row(
mainAxisSize: MainAxisSize.min,
children: [
if (pair.chapter?.bookmarked ?? false) ...[
const Icon(Icons.bookmark, size: 20),
KSizedBox.w4.size,
],
Expanded(
child: Text(
pair.manga?.title ?? "",
style: TextStyle(color: color),
return GestureDetector(
onSecondaryTap:
pair.chapter != null ? () => toggleSelect(pair.chapter!) : null,
child: ListTile(
title: Row(
mainAxisSize: MainAxisSize.min,
children: [
if (pair.chapter?.bookmarked ?? false) ...[
const Icon(Icons.bookmark, size: 20),
KSizedBox.w4.size,
],
Expanded(
child: Text(
pair.manga?.title ?? "",
style: TextStyle(color: color),
),
),
],
),
leading: ClipRRect(
borderRadius: BorderRadius.circular(8),
child: ServerImage(
imageUrl: pair.manga?.thumbnailUrl ?? "",
size: const Size.square(48),
),
],
),
leading: ClipRRect(
borderRadius: BorderRadius.circular(8),
child: ServerImage(
imageUrl: pair.manga?.thumbnailUrl ?? "",
size: const Size.square(48),
),
),
subtitle: Text(
pair.chapter?.name ?? pair.chapter?.chapterNumber.toString() ?? "",
style: TextStyle(color: color),
),
trailing: (pair.manga?.id != null && pair.chapter?.index != null)
? DownloadStatusIcon(
isDownloaded: pair.chapter?.downloaded ?? false,
mangaId: pair.manga!.id!,
chapter: pair.chapter!,
updateData: updatePair,
)
: null,
selectedColor: context.theme.colorScheme.onSurface,
selectedTileColor:
context.isDarkMode ? Colors.grey.shade700 : Colors.grey.shade300,
selected: isSelected,
onTap: pair.chapter != null && pair.manga != null
? () {
if (canTapSelect) {
toggleSelect(pair.chapter!);
} else {
context.push(
Routes.getReader(
"${pair.manga!.id}",
"${pair.chapter!.index}",
),
);
subtitle: Text(
pair.chapter?.name ?? pair.chapter?.chapterNumber.toString() ?? "",
style: TextStyle(color: color),
),
trailing: (pair.manga?.id != null && pair.chapter?.index != null)
? DownloadStatusIcon(
isDownloaded: pair.chapter?.downloaded ?? false,
mangaId: pair.manga!.id!,
chapter: pair.chapter!,
updateData: updatePair,
)
: null,
selectedColor: context.theme.colorScheme.onSurface,
selectedTileColor:
context.isDarkMode ? Colors.grey.shade700 : Colors.grey.shade300,
selected: isSelected,
onTap: pair.chapter != null && pair.manga != null
? () {
if (canTapSelect) {
toggleSelect(pair.chapter!);
} else {
context.push(
Routes.getReader(
"${pair.manga!.id}",
"${pair.chapter!.index}",
),
);
}
}
}
: null,
onLongPress:
pair.chapter != null ? () => toggleSelect(pair.chapter!) : null,
: null,
onLongPress:
pair.chapter != null ? () => toggleSelect(pair.chapter!) : null,
),
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:go_router/go_router.dart';

import '../../../widgets/custom_circular_progress_indicator.dart';
import '../../../widgets/list_popup.dart';
import '../../../widgets/radio_list_popup.dart';

class LoadingEnumPopupIconButton<T extends Enum> extends HookWidget {
const LoadingEnumPopupIconButton({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import 'package:go_router/go_router.dart';

import '../../../../constants/language_list.dart';
import '../../../../i18n/locale_keys.g.dart';
import '../../../../widgets/list_popup.dart';
import '../../../../widgets/radio_list_popup.dart';

class GeneralScreen extends StatelessWidget {
const GeneralScreen({super.key});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import '../../../../../../constants/db_keys.dart';
import '../../../../../../constants/enum.dart';
import '../../../../../../i18n/locale_keys.g.dart';
import '../../../../../../utils/storage/local/shared_preferences_client.dart';
import '../../../../../../widgets/list_popup.dart';
import '../../../../../../widgets/radio_list_popup.dart';

part 'reader_mode_tile.g.dart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import '../../../../../../constants/db_keys.dart';
import '../../../../../../constants/enum.dart';
import '../../../../../../i18n/locale_keys.g.dart';
import '../../../../../../utils/storage/local/shared_preferences_client.dart';
import '../../../../../../widgets/list_popup.dart';
import '../../../../../../widgets/radio_list_popup.dart';

part 'reader_navigation_layout_tile.g.dart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
import '../../../../../constants/enum.dart';
import '../../../../../global_providers/global_providers.dart';
import '../../../../../i18n/locale_keys.g.dart';
import '../../../../../widgets/list_popup.dart';
import '../../../../../widgets/radio_list_popup.dart';

class AuthTypeTile extends ConsumerWidget {
const AuthTypeTile({super.key});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import '../../../../constants/db_keys.dart';
import '../../../../i18n/locale_keys.g.dart';
import '../../../../utils/extensions/custom_extensions.dart';
import '../../../../utils/storage/local/shared_preferences_client.dart';
import '../../../../widgets/list_popup.dart';
import '../../../../widgets/radio_list_popup.dart';

part 'theme_mode_tile.g.dart';

Expand Down
5 changes: 3 additions & 2 deletions lib/src/utils/storage/dio_error_util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ class DioErrorUtil {
errorDescription = "Receive timeout";
break;
case DioErrorType.response:
errorDescription =
"Received invalid status code: ${error.response?.statusCode}";
errorDescription = (error.response?.statusCode) != null
? "Received invalid status code: ${error.response?.statusCode}"
: "Something went wrong!";
break;
case DioErrorType.sendTimeout:
errorDescription = "Send timeout";
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: tachidesk_sorayomi
description: A new Flutter frontend for Tachidesk.

publish_to: "none"
version: 0.3.5+1
version: 0.3.6+1

environment:
sdk: ">=2.18.1 <3.0.0"
Expand Down

0 comments on commit 2ce5a1a

Please sign in to comment.