Skip to content

Commit

Permalink
v.1.5.2 (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
lotusprey authored and lotus committed Sep 24, 2024
1 parent 857dc4d commit 703dd4e
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 61 deletions.
3 changes: 2 additions & 1 deletion lib/feature/activity/activities_provider.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'dart:async';

import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:otraku/extension/date_time_extension.dart';
import 'package:otraku/extension/future_extension.dart';
import 'package:otraku/feature/activity/activities_filter_model.dart';
import 'package:otraku/feature/activity/activities_filter_provider.dart';
Expand All @@ -19,7 +20,7 @@ class ActivitiesNotifier
extends AutoDisposeFamilyAsyncNotifier<Paged<Activity>, int> {
late int viewerId;
late ActivitiesFilter filter;
int _lastCreatedAt = DateTime.now().millisecondsSinceEpoch;
int _lastCreatedAt = DateTime.now().secondsSinceEpoch;

@override
FutureOr<Paged<Activity>> build(arg) async {
Expand Down
6 changes: 3 additions & 3 deletions lib/feature/activity/activity_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ class _ActivityFooterState extends State<ActivityFooter> {
style: Theme.of(context).textTheme.labelSmall,
),
const SizedBox(width: 5),
const Icon(Ionicons.chatbox, size: Theming.iconSmall),
const Icon(Icons.reply_all_rounded, size: Theming.iconSmall),
],
),
),
Expand All @@ -288,8 +288,8 @@ class _ActivityFooterState extends State<ActivityFooter> {
const SizedBox(width: 5),
Icon(
!widget.activity.isLiked
? Icons.favorite_rounded
: Icons.heart_broken_rounded,
? Icons.favorite_outline_rounded
: Icons.favorite_rounded,
size: Theming.iconSmall,
color: activity.isLiked
? Theme.of(context).colorScheme.primary
Expand Down
9 changes: 3 additions & 6 deletions lib/feature/activity/reply_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,7 @@ class _ReplyMentionButton extends StatelessWidget {
.appendReply(map),
),
),
child: const Icon(
Icons.reply_outlined,
size: Theming.iconSmall,
),
child: const Icon(Icons.reply_rounded, size: Theming.iconSmall),
),
),
);
Expand Down Expand Up @@ -240,8 +237,8 @@ class _ReplyLikeButtonState extends State<_ReplyLikeButton> {
const SizedBox(width: 5),
Icon(
!widget.reply.isLiked
? Icons.favorite_rounded
: Icons.heart_broken_rounded,
? Icons.favorite_outline_rounded
: Icons.favorite_rounded,
size: Theming.iconSmall,
color: widget.reply.isLiked
? Theme.of(context).colorScheme.primary
Expand Down
6 changes: 4 additions & 2 deletions lib/feature/calendar/calendar_filter_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ void showCalendarFilterSheet(BuildContext context, WidgetRef ref) {
showSheet(
context,
SimpleSheet(
initialHeight: Theming.minTapTarget * 3.5,
initialHeight: Theming.normalTapTarget * 2 +
MediaQuery.paddingOf(context).bottom +
40,
builder: (context, scrollCtrl) => ListView(
controller: scrollCtrl,
physics: Theming.bouncyPhysics,
padding: const EdgeInsets.symmetric(vertical: Theming.offset),
padding: const EdgeInsets.symmetric(vertical: 20),
children: [
ChipSelector(
title: 'Season',
Expand Down
4 changes: 3 additions & 1 deletion lib/feature/character/character_floating_actions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ class CharacterMediaFilterButton extends StatelessWidget {
showSheet(
context,
SimpleSheet(
initialHeight: Theming.minTapTarget * 3.5,
initialHeight: Theming.normalTapTarget * 2.5 +
MediaQuery.paddingOf(context).bottom +
40,
builder: (context, scrollCtrl) => ListView(
controller: scrollCtrl,
physics: Theming.bouncyPhysics,
Expand Down
3 changes: 2 additions & 1 deletion lib/feature/feed/feed_top_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ class FeedTopBarTrailingContent extends StatelessWidget {
if (count > 0) {
notificationIcon = Badge.count(
count: count,
alignment: AlignmentDirectional.centerStart,
offset: Offset.zero,
alignment: Alignment.topLeft,
child: notificationIcon,
);
}
Expand Down
4 changes: 3 additions & 1 deletion lib/feature/staff/staff_floating_actions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ class StaffFilterButton extends StatelessWidget {
showSheet(
context,
SimpleSheet(
initialHeight: Theming.minTapTarget * 3.5,
initialHeight: Theming.normalTapTarget * 4 +
MediaQuery.paddingOf(context).bottom +
40,
builder: (context, scrollCtrl) => ListView(
controller: scrollCtrl,
physics: Theming.bouncyPhysics,
Expand Down
45 changes: 4 additions & 41 deletions lib/feature/studio/studio_floating_actions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,45 +4,9 @@ import 'package:ionicons/ionicons.dart';
import 'package:otraku/feature/filter/chip_selector.dart';
import 'package:otraku/feature/media/media_models.dart';
import 'package:otraku/feature/studio/studio_filter_provider.dart';
import 'package:otraku/feature/studio/studio_model.dart';
import 'package:otraku/util/theming.dart';
import 'package:otraku/extension/snack_bar_extension.dart';
import 'package:otraku/widget/sheets.dart';

class StudioFavoriteButton extends StatefulWidget {
const StudioFavoriteButton(this.studio, this.toggleFavorite);

final Studio studio;
final Future<Object?> Function() toggleFavorite;

@override
State<StudioFavoriteButton> createState() => _StudioFavoriteButtonState();
}

class _StudioFavoriteButtonState extends State<StudioFavoriteButton> {
@override
Widget build(BuildContext context) {
final studio = widget.studio;

return FloatingActionButton(
tooltip: studio.isFavorite ? 'Unfavourite' : 'Favourite',
heroTag: 'favorite',
child: studio.isFavorite
? const Icon(Icons.favorite)
: const Icon(Icons.favorite_border),
onPressed: () async {
setState(() => studio.isFavorite = !studio.isFavorite);

final err = await widget.toggleFavorite();
if (err == null) return;

setState(() => studio.isFavorite = !studio.isFavorite);
if (context.mounted) SnackBarExtension.show(context, err.toString());
},
);
}
}

class StudioFilterButton extends StatelessWidget {
const StudioFilterButton(this.id, this.ref);

Expand All @@ -64,14 +28,13 @@ class StudioFilterButton extends StatelessWidget {
showSheet(
context,
SimpleSheet(
initialHeight: Theming.minTapTarget * 5,
initialHeight: Theming.normalTapTarget * 4 +
MediaQuery.paddingOf(context).bottom +
40,
builder: (context, scrollCtrl) => ListView(
controller: scrollCtrl,
physics: Theming.bouncyPhysics,
padding: const EdgeInsets.symmetric(
horizontal: Theming.offset,
vertical: 20,
),
padding: const EdgeInsets.symmetric(vertical: 20),
children: [
ChipSelector.ensureSelected(
title: 'Sort',
Expand Down
2 changes: 1 addition & 1 deletion lib/util/persistence.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import 'package:otraku/util/theming.dart';
import 'package:path_provider/path_provider.dart';

/// Current app version.
const versionCode = '1.5.1';
const versionCode = '1.5.2';

/// General options keys.
enum _OptionKey {
Expand Down
4 changes: 2 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,10 @@ packages:
dependency: "direct main"
description:
name: flutter_local_notifications
sha256: c500d5d9e7e553f06b61877ca6b9c8b92c570a4c8db371038702e8ce57f8a50f
sha256: "49eeef364fddb71515bc78d5a8c51435a68bccd6e4d68e25a942c5e47761ae71"
url: "https://pub.dev"
source: hosted
version: "17.2.2"
version: "17.2.3"
flutter_local_notifications_linux:
dependency: transitive
description:
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: An unofficial AniList app.

publish_to: 'none'

version: 1.5.1+75
version: 1.5.2+76

environment:
sdk: '>=3.0.0 <4.0.0'
Expand Down Expand Up @@ -49,7 +49,7 @@ dependencies:
workmanager: ^0.5.2

# Sending device notifications.
flutter_local_notifications: ^17.2.2
flutter_local_notifications: ^17.2.3

# Translating html into flutter widgets.
flutter_widget_from_html_core: ^0.15.2
Expand Down

0 comments on commit 703dd4e

Please sign in to comment.