Skip to content

Commit

Permalink
V0.4.5 (#141)
Browse files Browse the repository at this point in the history
* made column content in alert dialog scrollable

* category id bug

* clean up

* prop rename

* version bump

* updated riverpod streams

* pre-commit hook text update
  • Loading branch information
DattatreyaReddy authored Mar 7, 2023
1 parent e3ea2fe commit 84f0fe8
Show file tree
Hide file tree
Showing 52 changed files with 1,015 additions and 953 deletions.
3 changes: 2 additions & 1 deletion .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

printf "\e[33;1m%s\e[0m\n" 'Pre-Commit'
printf "\e[33;1m%s\e[0m\n" 'Started Sorayomi Pre-Commit hook'

# Undo the stash of the files
pop_stash_files () {
Expand Down Expand Up @@ -104,4 +104,5 @@ printf '%s\n' "${avar}"
# printf "\e[33;1m%s\e[0m\n" 'Finished running Unit Tests'
# printf '%s\n' "${avar}"

printf "\e[33;1m%s\e[0m\n" 'Finished running Sorayomi Pre-hook'
pop_stash_files
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import 'package:package_info_plus/package_info_plus.dart';
import 'package:shared_preferences/shared_preferences.dart';

import 'src/features/about/presentation/about/controllers/about_controller.dart';
import 'src/global_providers/global_providers.dart';
import 'src/sorayomi.dart';
import 'src/utils/storage/local/shared_preferences_client.dart';

Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
Expand Down
12 changes: 6 additions & 6 deletions lib/src/features/about/presentation/about/about_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ class AboutScreen extends HookConsumerWidget {
const Divider(),
ClipboardListTile(
title: context.l10n!.client,
subtitle: packageInfo.appName,
value: packageInfo.appName,
),
ClipboardListTile(
title: context.l10n!.clientVersion,
subtitle: "v${packageInfo.version}",
value: "v${packageInfo.version}",
),
ListTile(
title: Text(context.l10n!.whatsNew),
Expand All @@ -156,20 +156,20 @@ class AboutScreen extends HookConsumerWidget {
const Divider(),
ClipboardListTile(
title: context.l10n!.server,
subtitle: about.name,
value: about.name,
),
ClipboardListTile(
title: context.l10n!.channel,
subtitle: about.buildType,
value: about.buildType,
),
if (serverVer.isNotBlank)
ClipboardListTile(
title: context.l10n!.serverVersion,
subtitle: serverVer,
value: serverVer,
),
ClipboardListTile(
title: context.l10n!.buildTime,
subtitle: (about.buildTime).isNull
value: (about.buildTime).isNull
? null
: DateTime.fromMillisecondsSinceEpoch(
(about.buildTime ?? 0) * 1000,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ class ClipboardListTile extends ConsumerWidget {
const ClipboardListTile({
super.key,
required this.title,
required this.subtitle,
required this.value,
});
final String title;
final String? subtitle;
final String? value;
@override
Widget build(BuildContext context, WidgetRef ref) {
return ListTile(
title: Text(title),
subtitle: subtitle.isNotBlank ? Text(subtitle!) : null,
onTap: subtitle.isNotBlank
subtitle: value.isNotBlank ? Text(value!) : null,
onTap: value.isNotBlank
? () {
final msg = "$title: $subtitle";
final msg = "$title: $value";
Clipboard.setData(
ClipboardData(text: msg),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class BrowseScreen extends HookConsumerWidget {
initialText: ref.read(extensionQueryProvider),
onChanged: (val) => ref
.read(extensionQueryProvider.notifier)
.state = val,
.update(val),
onClose: () => showSearch.value = false,
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import 'package:riverpod_annotation/riverpod_annotation.dart';

import '../../../../../constants/db_keys.dart';
import '../../../../../utils/extensions/custom_extensions.dart';
import '../../../../../utils/storage/local/shared_preferences_client.dart';
import '../../../../../utils/mixin/shared_preferences_client_mixin.dart';
import '../../../../../utils/mixin/state_provider_mixin.dart';
import '../../../../settings/presentation/browse/widgets/show_nsfw_switch/show_nsfw_switch.dart';
import '../../../data/extension_repository/extension_repository.dart';
import '../../../domain/extension/extension_model.dart';
Expand Down Expand Up @@ -72,7 +73,7 @@ List<String> extensionFilterLangList(ExtensionFilterLangListRef ref) {

@riverpod
class ExtensionLanguageFilter extends _$ExtensionLanguageFilter
with SharedPreferenceClient<List<String>> {
with SharedPreferenceClientMixin<List<String>> {
@override
List<String>? build() => initialize(
ref,
Expand Down Expand Up @@ -113,7 +114,7 @@ AsyncValue<Map<String, List<Extension>>> extensionMapFilteredAndQueried(
}

@riverpod
class ExtensionQuery extends _$ExtensionQuery {
class ExtensionQuery extends _$ExtensionQuery with StateProviderMixin<String?> {
@override
String? build() => null;
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import 'package:riverpod_annotation/riverpod_annotation.dart';

import '../../../../../constants/db_keys.dart';
import '../../../../../utils/extensions/custom_extensions.dart';
import '../../../../../utils/storage/local/shared_preferences_client.dart';
import '../../../../../utils/mixin/shared_preferences_client_mixin.dart';
import '../../../data/source_repository/source_repository.dart';
import '../../../domain/source/source_model.dart';

Expand Down Expand Up @@ -67,7 +67,7 @@ AsyncValue<Map<String, List<Source>>?> sourceMapFiltered(

@riverpod
class SourceLanguageFilter extends _$SourceLanguageFilter
with SharedPreferenceClient<List<String>> {
with SharedPreferenceClientMixin<List<String>> {
@override
List<String>? build() => initialize(
ref,
Expand All @@ -78,7 +78,7 @@ class SourceLanguageFilter extends _$SourceLanguageFilter

@riverpod
class SourceLastUsed extends _$SourceLastUsed
with SharedPreferenceClient<String> {
with SharedPreferenceClientMixin<String> {
@override
String? build() => initialize(
ref,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import 'package:riverpod_annotation/riverpod_annotation.dart';
import '../../../../../constants/db_keys.dart';
import '../../../../../constants/enum.dart';
import '../../../../../utils/extensions/custom_extensions.dart';
import '../../../../../utils/storage/local/shared_preferences_client.dart';
import '../../../../../utils/mixin/shared_preferences_client_mixin.dart';
import '../../../data/source_repository/source_repository.dart';
import '../../../domain/filter/filter_model.dart';
import '../../../domain/source/source_model.dart';
Expand Down Expand Up @@ -75,7 +75,7 @@ class SourceMangaFilterList extends _$SourceMangaFilterList {

@riverpod
class SourceDisplayMode extends _$SourceDisplayMode
with SharedPreferenceEnumClient<DisplayMode> {
with SharedPreferenceEnumClientMixin<DisplayMode> {
@override
DisplayMode? build() => initialize(
ref,
Expand Down
Loading

0 comments on commit 84f0fe8

Please sign in to comment.