Skip to content

Commit

Permalink
Ability to override daily setting
Browse files Browse the repository at this point in the history
  • Loading branch information
jankratochvilcz committed Dec 22, 2024
1 parent 1580e16 commit ebca877
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/views/organisms/settings/time_investment_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import 'package:kotobaten/models/slices/user/user_repository.dart';
import 'package:kotobaten/models/slices/user/user_service.dart';
import 'package:kotobaten/views/atoms/description.dart';
import 'package:kotobaten/views/atoms/heading.dart';
import 'package:kotobaten/views/molecules/button.dart';
import 'package:kotobaten/views/molecules/button_async.dart';
import 'package:kotobaten/views/molecules/headed.dart';
import 'package:kotobaten/views/organisms/loading.dart';

Expand Down Expand Up @@ -41,7 +43,6 @@ class TimeInvestmentCard extends HookConsumerWidget {
return Headed(
SizedBox(
width: 400,
height: 150,
child: Column(children: [
const Description(
'Set the maximum for how many words you can daily. 100 words may take 30 minutes with good focus.'),
Expand All @@ -61,6 +62,13 @@ class TimeInvestmentCard extends HookConsumerWidget {
currentValue.value = valueAsInt;
userService.updateRetentionBackstopMaxThreshold(valueAsInt);
},
),
ButtonAsync(
'Reset today\'s practice cards',
() async {
await userService.refreshUser(updateRetentionBackstop: true);
},
type: ButtonType.standard,
)
]),
),
Expand Down

0 comments on commit ebca877

Please sign in to comment.