Skip to content

Commit

Permalink
2.8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
arianneorpilla committed Jun 14, 2023
1 parent fcc43c7 commit 6109b25
Show file tree
Hide file tree
Showing 10 changed files with 79 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
java-version: '11'
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.10.0'
flutter-version: '3.10.4'
- run: flutter pub get
working-directory: yuuna
- run: flutter pub run build_runner build --delete-conflicting-outputs
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<h3 align="center">jidoujisho</h3>
<p align="center">A full-featured immersion language learning suite for mobile.</p>
<p align="center">
<a href="https://github.com/lrorpilla/jidoujisho/releases/tag/2.8.2">
<a href="https://github.com/lrorpilla/jidoujisho/releases/tag/2.8.3">
<img src="https://img.shields.io/github/v/release/lrorpilla/jidoujisho" alt="latest release" />
</a>
<a href="https://github.com/lrorpilla/jidoujisho/commits/main">
Expand Down Expand Up @@ -34,7 +34,7 @@
---

<p align="center" style="margin:0"><b>✨ Latest Release:
<a href="https://github.com/lrorpilla/jidoujisho/releases/tag/2.8.2">2.8.2</a>
<a href="https://github.com/lrorpilla/jidoujisho/releases/tag/2.8.3">2.8.3</a>
</b></p>

<b>
Expand Down
2 changes: 1 addition & 1 deletion chisa/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.8.2"
version: "2.8.3"
audio_service:
dependency: "direct main"
description:
Expand Down
6 changes: 4 additions & 2 deletions yuuna/lib/i18n/strings.g.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/// Generated file. Do not edit.
///
/// Locales: 1
/// Strings: 386
/// Strings: 387
///
/// Built on 2023-06-07 at 10:29 UTC
/// Built on 2023-06-14 at 07:14 UTC
// coverage:ignore-file
// ignore_for_file: type=lint
Expand Down Expand Up @@ -530,6 +530,7 @@ class _StringsEn implements BaseTranslations<AppLocale, _StringsEn> {
String get reading_list_remove_toast => 'Removed from the reading list.';
String get ad_block_hosts => 'Ad-block hosts';
String get error_parsing_hosts_file => 'Error parsing hosts file.';
String get double_tap_seek_duration => 'Double tap seek duration';
}

// Path: retrying_in
Expand Down Expand Up @@ -954,6 +955,7 @@ extension on _StringsEn {
case 'reading_list_remove_toast': return 'Removed from the reading list.';
case 'ad_block_hosts': return 'Ad-block hosts';
case 'error_parsing_hosts_file': return 'Error parsing hosts file.';
case 'double_tap_seek_duration': return 'Double tap seek duration';
default: return null;
}
}
Expand Down
4 changes: 2 additions & 2 deletions yuuna/lib/i18n/strings.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,6 @@
"file_downloaded": "File downloaded: $name",
"cfhange_sort_order": "Change Sort Order",
"login": "Login",

"send": "Send",
"no_messages": "Start a chat",
"enter_message": "Enter message...",
Expand Down Expand Up @@ -419,5 +418,6 @@
"reading_list_add_toast": "Added to reading list.",
"reading_list_remove_toast": "Removed from the reading list.",
"ad_block_hosts": "Ad-block hosts",
"error_parsing_hosts_file": "Error parsing hosts file."
"error_parsing_hosts_file": "Error parsing hosts file.",
"double_tap_seek_duration": "Double tap seek duration"
}
16 changes: 16 additions & 0 deletions yuuna/lib/src/models/app_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3413,6 +3413,22 @@ class AppModel with ChangeNotifier {
await _preferences.put('close_on_export', !closeCreatorOnExport);
}

/// Default value of [doubleTapSeekDuration].
final int defaultDoubleTapSeekDuration = 5000;

/// The default duration that the video player will seek forward or backward
/// when double tapped by the user.
int get doubleTapSeekDuration {
return _preferences.get('double_tap_seek_duration',
defaultValue: defaultDoubleTapSeekDuration);
}

/// Sets the default duration that the video player will seek forward or
/// backward when double tapped by the user.
void setDoubleTapSeekDuration(int value) async {
await _preferences.put('double_tap_seek_duration', value);
}

/// Whether or not it is the app's first time setup to show the languages
/// dialog.
bool get isFirstTimeSetup {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ class PlayerSettingsDialogPage extends BasePage {
}

class _DictionaryDialogPageState extends BasePageState {
late TextEditingController _seekDurationController;

@override
void initState() {
super.initState();

_seekDurationController = TextEditingController(
text: appModelNoUpdate.doubleTapSeekDuration.toString());
}

@override
Widget build(BuildContext context) {
return AlertDialog(
Expand Down Expand Up @@ -51,6 +61,9 @@ class _DictionaryDialogPageState extends BasePageState {
children: [
buildHardwareAccelerationSwitch(),
buildOpenSLESSwitch(),
const Space.small(),
const JidoujishoDivider(),
buildSeekDurationField(),
],
),
),
Expand Down Expand Up @@ -107,4 +120,36 @@ class _DictionaryDialogPageState extends BasePageState {
],
);
}

Widget buildSeekDurationField() {
return TextField(
onChanged: (value) {
int newDuration = int.tryParse(value) ?? appModel.doubleTapSeekDuration;
if (newDuration.isNegative) {
newDuration = appModel.doubleTapSeekDuration;
_seekDurationController.text = newDuration.toString();
}

appModel.setDoubleTapSeekDuration(newDuration);
},
controller: _seekDurationController,
keyboardType: TextInputType.number,
decoration: InputDecoration(
floatingLabelBehavior: FloatingLabelBehavior.always,
suffixText: t.unit_milliseconds,
suffixIcon: JidoujishoIconButton(
tooltip: t.reset,
size: 18,
onTap: () async {
_seekDurationController.text =
appModel.doubleTapSeekDuration.toString();
appModel.setDoubleTapSeekDuration(appModel.doubleTapSeekDuration);
FocusScope.of(context).unfocus();
},
icon: Icons.undo,
),
labelText: t.double_tap_seek_duration,
),
);
}
}
8 changes: 4 additions & 4 deletions yuuna/lib/src/pages/implementations/player_source_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -846,8 +846,8 @@ class _PlayerSourcePageState extends BaseSourcePageState<PlayerSourcePage>
onDoubleTap: () async {
cancelHideTimer();

await _playerController.seekTo(
_positionNotifier.value - const Duration(seconds: 10));
await _playerController.seekTo(_positionNotifier.value -
Duration(milliseconds: appModel.doubleTapSeekDuration));
_autoPauseNotifier.value = null;
_autoPauseMemory = null;
_bufferingNotifier.value = true;
Expand All @@ -873,8 +873,8 @@ class _PlayerSourcePageState extends BaseSourcePageState<PlayerSourcePage>
onDoubleTap: () async {
cancelHideTimer();

await _playerController.seekTo(
_positionNotifier.value + const Duration(seconds: 10));
await _playerController.seekTo(_positionNotifier.value +
Duration(milliseconds: appModel.doubleTapSeekDuration));
_autoPauseNotifier.value = null;
_autoPauseMemory = null;
_bufferingNotifier.value = true;
Expand Down
2 changes: 1 addition & 1 deletion yuuna/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1926,4 +1926,4 @@ packages:
version: "1.12.4"
sdks:
dart: ">=3.0.0 <4.0.0"
flutter: ">=3.10.0"
flutter: ">=3.10.4"
6 changes: 3 additions & 3 deletions yuuna/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: yuuna
description: A full-featured immersion language learning suite for mobile.
publish_to: 'none'
version: 2.8.2+95
version: 2.8.3+96
environment:
sdk: ">=3.0.0<4.0.0"
flutter: "^3.10.0"
flutter: "^3.10.4"

dependencies:
audio_service: ^0.18.9
Expand Down Expand Up @@ -132,6 +132,7 @@ dependencies:
wakelock: ^0.6.2
web_socket_channel: ^2.3.0
youtube_explode_dart: ^1.12.4

dependency_overrides:
ffi: ^2.0.0
freezed_annotation: ^2.2.0 # Caused by spaces
Expand All @@ -148,7 +149,6 @@ dev_dependencies:
flutter_lints: ^2.0.1
isar_generator: ^3.1.0+1


flutter_icons:
android: "launcher_icon"
ios: true
Expand Down

0 comments on commit 6109b25

Please sign in to comment.