Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
146 changes: 0 additions & 146 deletions ai_scan.py

This file was deleted.

2 changes: 0 additions & 2 deletions lib/core/widget/likes_widget_sync_provider.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:home_widget/home_widget.dart';
import 'likes_widget_updater.dart';
import '../../features/authentication/presentation/providers/auth_provider.dart';
import '../../features/authentication/presentation/providers/auth_state.dart';
import '../../features/library/presentation/providers/library_providers.dart';
import '../routing/app_router.dart';

final likesWidgetSyncProvider = NotifierProvider<LikesWidgetSyncNotifier, void>(
LikesWidgetSyncNotifier.new,
Expand Down
2 changes: 1 addition & 1 deletion lib/features/comments/data/models/comment_dto.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class CommentDto {
isLikedByMe: json['is_liked_by_me'] as bool? ?? false,
replyCount: json['reply_count'] as int? ?? 0,
parentCommentId: json['parent_comment_id'] as String?,
isAuthorBlocked: json['is_author_blocked'] as bool? ?? false,
isAuthorBlocked: json['is_user_blocked'] as bool? ?? false,
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ class _CommentsScreenState extends ConsumerState<CommentsScreen> {
});

WidgetsBinding.instance.addPostFrameCallback((_) {
// Ensure the track is in the sync map for global count synchronization
ref.read(trackSyncProvider.notifier).syncTrack(widget.track);

ref
.read(trackCommentsProvider(widget.track.id).notifier)
.setInitialTrack(widget.track);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ class _ActionButton extends StatelessWidget {
Widget build(BuildContext context) {
return GestureDetector(
key: const Key('action_button_gesture'),
behavior: HitTestBehavior.opaque,
onTap: onTap,
child: Column(
key: const Key('action_button_column'),
Expand Down
4 changes: 2 additions & 2 deletions lib/features/feed/presentation/widgets/feed_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ class FeedListState extends ConsumerState<FeedList> {
Positioned(
top: 0,
left: 0,
right: 0,
right: 80,
bottom: 350,
child: GestureDetector(
behavior: HitTestBehavior.translucent,
Expand Down Expand Up @@ -255,7 +255,7 @@ class FeedListState extends ConsumerState<FeedList> {
Positioned(
top: 0,
left: 0,
right: 0,
right: 80,
bottom: 350,
child: GestureDetector(
behavior: HitTestBehavior.translucent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,11 @@ class _LikesPlaylistsScreenState extends ConsumerState<LikesPlaylistsScreen>
//Tracks Tab
data: (tracks) => ListView.builder(
key: const Key('likes_playlists_tracks_list'),
itemCount: tracks.length,
itemCount: tracks.length + 1,
itemBuilder: (context, index) {
if (index == tracks.length) {
return const SizedBox(height: 50);
}
final track = tracks[index];
return SharedEmbedTileWidget(
key: Key('likes_playlists_track_${track.embedId}_tile'),
Expand Down Expand Up @@ -137,8 +140,11 @@ class _LikesPlaylistsScreenState extends ConsumerState<LikesPlaylistsScreen>
//Playlists Tab, Note: this tab has both liked/created playlists/albums
data: (embeds) => ListView.builder(
key: const Key('likes_playlists_playlists_albums_list'),
itemCount: embeds.length,
itemCount: embeds.length + 1,
itemBuilder: (context, index) {
if (index == embeds.length) {
return const SizedBox(height: 50);
}
final embed = embeds[index];
return SharedEmbedTileWidget(
key: Key('likes_playlists_embed_${embed.embedId}_tile'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,28 @@ class SharedEmbedTileWidget extends StatelessWidget {
tileColor: isSelected ? const Color(0xFF2F2F2F) : Colors.transparent,
leading: ClipRRect(
borderRadius: BorderRadius.circular(4),
child: embed.thumbnailUrl != null
child: (embed.thumbnailUrl != null && embed.thumbnailUrl!.isNotEmpty)
? Image.network(
embed.thumbnailUrl!,
width: 48,
height: 48,
fit: BoxFit.cover,
errorBuilder: (context, error, stackTrace) => Container(
width: 48,
height: 48,
color: const Color(0xFF2F2F2F),
child: embed.embedType == 'track'
? const Icon(Icons.music_note, color: Colors.white54)
: const Icon(Icons.queue_music, color: Colors.white54),
),
)
: Container(
width: 48,
height: 48,
color: Color(0xFF2F2F2F),
color: const Color(0xFF2F2F2F),
child: embed.embedType == 'track'
? Icon(Icons.music_note, color: Colors.white54)
: Icon(Icons.queue_music, color: Colors.white54),
? const Icon(Icons.music_note, color: Colors.white54)
: const Icon(Icons.queue_music, color: Colors.white54),
),
),
title: Text(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class _CancellationScreenState extends ConsumerState<CancellationScreen> {
builder: (_) => _ConfirmDialog(),
);
if (confirm != true || !mounted) return;
_timer?.cancel();

setState(() => _isCanceled = true);
await ref.read(premiumProvider.notifier).cancel();
}
Expand Down Expand Up @@ -477,7 +477,46 @@ class _CancellationScreenState extends ConsumerState<CancellationScreen> {
elevation: 0,
shape: const RoundedRectangleBorder(),
),
onPressed: () => context.push('/upgrade/plans'),
onPressed: () {
final currentPlan = ref
.read(premiumProvider)
.subscription
?.plan;
final premiumPlans = ref
.read(premiumProvider)
.plans
.where((p) => p.isPremium)
.toList();

final targetPlan =
currentPlan ??
(premiumPlans.isNotEmpty
? premiumPlans.first
: null);

if (targetPlan != null) {
context.go(
'/upgrade/checkout',
extra: {
'planId': targetPlan.planId,
'planName': targetPlan.name == 'premium'
? 'Artist Pro'
: targetPlan.name,
'price': targetPlan.price,
'features': [
'Unlimited track uploads',
'Unlimited playlists',
'Offline listening',
'No ads',
'Priority support',
],
},
);
} else {
// Fallback to plans if no plan found
context.go('/upgrade/plans');
}
},
child: Text(
'Resubscribe',
style: GoogleFonts.inter(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,13 @@ class _CheckoutScreenState extends ConsumerState<CheckoutScreen> {
color: Colors.white,
size: 18,
),
onPressed: () => Navigator.pop(context),
onPressed: () {
if (context.canPop()) {
context.pop();
} else {
context.go('/upgrade/plans');
}
},
),
title: Text(
'Complete your order',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,6 @@ class _PublicProfilePageState extends ConsumerState<PublicProfilePage> {
: widget.userId;

Future.microtask(() async {
if (_resolvedUserId == 'me') {
final currentState = ref.read(ownProfileProvider);
if (currentState is ProfileLoaded) return;
}

if (_resolvedUserId == 'me') {
await ref
.read(ownProfileProvider.notifier)
Expand Down Expand Up @@ -716,7 +711,7 @@ class _PublicProfilePageState extends ConsumerState<PublicProfilePage> {
Text(
'Artist Pro',
style: AppTheme.labelSmall.copyWith(
color: const Color(0xFFFBC02D),
color: const Color(0xFFFFFFFF),
fontWeight: FontWeight.bold,
letterSpacing: 0.5,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ final fanLeaderboardProvider = FutureProvider.family<FanLeaderboard, String>((
final period = ref.watch(fanLeaderboardPeriodProvider(trackId));
final useCase = ref.watch(getFanLeaderboardUseCaseProvider);

return useCase(trackId, period.value);
return useCase(trackId, period.value).timeout(const Duration(seconds: 5));
});
11 changes: 4 additions & 7 deletions lib/features/track/presentation/widgets/fans_leaderboard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,11 @@ class FansLeaderboard extends ConsumerWidget {
padding: EdgeInsets.symmetric(vertical: 40.0),
child: CircularProgressIndicator(),
),
error: (err, stack) => Padding(
padding: const EdgeInsets.symmetric(
vertical: 40.0,
horizontal: 24,
),
error: (err, stack) => const Padding(
padding: EdgeInsets.symmetric(vertical: 40.0, horizontal: 24),
child: Text(
"Error loading leaderboard: $err",
style: const TextStyle(color: Colors.red),
"Leaderboard is currently unavailable. Please check back later.",
style: TextStyle(color: AppTheme.textSecondary),
textAlign: TextAlign.center,
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,7 @@ class TrackActionBar extends ConsumerWidget {
Icons.chat_outlined,
Formatters.formatCount(syncedTrack.commentCount),
onTap: () {
context.push(
'/home/comments/${syncedTrack.id}',
extra: syncedTrack,
);
context.push('/comments/${syncedTrack.id}', extra: syncedTrack);
},
),
const SizedBox(width: 20),
Expand Down
Loading
Loading