Skip to content
Merged
11 changes: 1 addition & 10 deletions .env
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
API_URL=https://node.shoy.publicvm.com/
# API_test_URL=https://example.com/

# API_URL=https://wanita-hypernormal-cherise.ngrok-free.dev/
# API_URL=https://avah-pollinical-randal.ngrok-free.dev/
# API_URL=https://0f9eef01f130.ngrok-free.app/
# API_URL=https://ingeborg-untrammed-leo.ngrok-free.dev/
# Socket_Url=https://app-dbef67eb-9a2e-44fa-abff-3e8b83204d9c.cleverapps.io
# serverClientId=1096363232606-2fducjadk56bt4nsreqkj2jna7oiomga.apps.googleusercontent.com

API_URL=https://avah-pollinical-randal.ngrok-free.dev/
20 changes: 12 additions & 8 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,13 @@ EOF
script {
try {
sh '''
echo "Kaniko building lint target (no push, no cache)..."
echo "Kaniko building lint target..."
/kaniko/executor \
--context=. \
--dockerfile=Dockerfile \
--no-push \
--destination=${DOCKER_IMAGE}:build-TEST \
--cache=true \
--cache-ttl=24h \
--target=lint
'''
} catch (err) {
Expand All @@ -101,12 +103,14 @@ EOF
container('kaniko') {
script {
sh '''
echo "Kaniko building test target (no push)..."
#/kaniko/executor \
# --context=. \
#--dockerfile=Dockerfile \
#--no-push \
#--target=test
echo "Kaniko building test target..."
/kaniko/executor \
--context=. \
--dockerfile=Dockerfile \
--destination=${DOCKER_IMAGE}:build-TEST \
--cache=true \
--cache-ttl=24h \
--target=test
'''
}
}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:lite_x/core/theme/palette.dart';
import 'package:lite_x/core/theme/Palette.dart';
import 'package:lite_x/features/home/view/widgets/profile_side_drawer.dart';
import '../widgets/notification_tabs.dart';
import '../widgets/status_bar.dart';
Expand All @@ -24,12 +24,10 @@ class _NotificationScreenState extends State<NotificationScreen> {
child: Column(
children: [
Statusbar(scaffoldKey: _scaffoldKey),
const Expanded(
child: NotificationTabs(),
),
const Expanded(child: NotificationTabs()),
],
),
),
);
}
}
}
74 changes: 25 additions & 49 deletions lib/features/notifications/view/widgets/card/all_tweet_card.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:lite_x/core/providers/dio_interceptor.dart';
import 'package:lite_x/core/theme/palette.dart';
import 'package:lite_x/core/theme/Palette.dart';
import 'package:lite_x/features/home/repositories/home_repository.dart';
import 'package:lite_x/features/home/view/screens/quote_composer_screen.dart';
import 'package:lite_x/features/home/view/screens/tweet_screen.dart';
Expand Down Expand Up @@ -116,7 +116,9 @@ class _AllTweetCardWidgetState extends ConsumerState<AllTweetCardWidget> {
_showSnack('User profile not available');
return;
}
Navigator.of(context).pushNamed('/profile', arguments: {'username': username});
Navigator.of(
context,
).pushNamed('/profile', arguments: {'username': username});
}

Future<void> _toggleLike() async {
Expand Down Expand Up @@ -164,7 +166,9 @@ class _AllTweetCardWidgetState extends ConsumerState<AllTweetCardWidget> {
});
final currentTweetId = tweetId;
if (currentTweetId != null) {
ref.read(notificationViewModelProvider.notifier).updateTweetInteractions(
ref
.read(notificationViewModelProvider.notifier)
.updateTweetInteractions(
currentTweetId,
likesCount: previousCount,
isLiked: previousLiked,
Expand Down Expand Up @@ -222,7 +226,9 @@ class _AllTweetCardWidgetState extends ConsumerState<AllTweetCardWidget> {
});
final currentTweetId = tweetId;
if (currentTweetId != null) {
ref.read(notificationViewModelProvider.notifier).updateTweetInteractions(
ref
.read(notificationViewModelProvider.notifier)
.updateTweetInteractions(
currentTweetId,
repostsCount: previousCount,
isRetweeted: previousState,
Expand Down Expand Up @@ -260,19 +266,15 @@ class _AllTweetCardWidgetState extends ConsumerState<AllTweetCardWidget> {
}

final vm = ref.read(notificationViewModelProvider.notifier);
vm.updateTweetInteractions(
tweetId,
isBookmarked: _bookmarked,
);
vm.updateTweetInteractions(tweetId, isBookmarked: _bookmarked);
} catch (_) {
if (mounted) {
setState(() {
_bookmarked = previousBookmarked;
});
ref.read(notificationViewModelProvider.notifier).updateTweetInteractions(
tweetId,
isBookmarked: previousBookmarked,
);
ref
.read(notificationViewModelProvider.notifier)
.updateTweetInteractions(tweetId, isBookmarked: previousBookmarked);
}
_showSnack('Unable to update bookmark right now.');
} finally {
Expand Down Expand Up @@ -372,9 +374,7 @@ class _AllTweetCardWidgetState extends ConsumerState<AllTweetCardWidget> {
margin: const EdgeInsets.symmetric(vertical: 8.0, horizontal: 16.0),
padding: padding ?? const EdgeInsets.symmetric(vertical: 12.0),
decoration: const BoxDecoration(
border: Border(
bottom: BorderSide(color: Colors.white, width: 0.5),
),
border: Border(bottom: BorderSide(color: Colors.white, width: 0.5)),
),
child: child,
);
Expand All @@ -394,10 +394,7 @@ class _AllTweetCardWidgetState extends ConsumerState<AllTweetCardWidget> {
return Container(
width: 36,
height: 36,
decoration: BoxDecoration(
color: Colors.black,
shape: BoxShape.circle,
),
decoration: BoxDecoration(color: Colors.black, shape: BoxShape.circle),
child: Icon(icon, color: color, size: 30),
);
}
Expand Down Expand Up @@ -495,7 +492,6 @@ class _AllTweetCardWidgetState extends ConsumerState<AllTweetCardWidget> {
(notification.quotedContent?.isNotEmpty ?? false);
}


Widget _metricButton({
required IconData icon,
int? count,
Expand Down Expand Up @@ -548,10 +544,8 @@ class _AllTweetCardWidgetState extends ConsumerState<AllTweetCardWidget> {
onTap: _toggleLike,
),
_metricButton(
icon:
_bookmarked ? Icons.bookmark : Icons.bookmark_border,
color:
_bookmarked ? Palette.primary : Palette.textTertiary,
icon: _bookmarked ? Icons.bookmark : Icons.bookmark_border,
color: _bookmarked ? Palette.primary : Palette.textTertiary,
onTap: _toggleBookmark,
),
_metricButton(
Expand Down Expand Up @@ -599,12 +593,7 @@ class _AllTweetCardWidgetState extends ConsumerState<AllTweetCardWidget> {
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Text(
notification.body,
style: _bodyStyle,
),
),
Expanded(child: Text(notification.body, style: _bodyStyle)),
const SizedBox(width: 12),
_buildTimestampText(),
],
Expand All @@ -622,8 +611,7 @@ class _AllTweetCardWidgetState extends ConsumerState<AllTweetCardWidget> {

// Prefer tweet content as snapshot; fall back to notification body
final String snapshotText;
if (notification.tweet != null &&
notification.tweet!.content.isNotEmpty) {
if (notification.tweet != null && notification.tweet!.content.isNotEmpty) {
snapshotText = notification.tweet!.content;
} else {
snapshotText = notification.body;
Expand All @@ -649,10 +637,7 @@ class _AllTweetCardWidgetState extends ConsumerState<AllTweetCardWidget> {
text: '${notification.actor.name} ',
style: _nameStyle,
children: [
TextSpan(
text: description,
style: _secondaryStyle,
),
TextSpan(text: description, style: _secondaryStyle),
],
),
),
Expand All @@ -663,10 +648,7 @@ class _AllTweetCardWidgetState extends ConsumerState<AllTweetCardWidget> {
),
if (snapshotText.isNotEmpty) ...[
const SizedBox(height: 6),
Text(
snapshotText,
style: _secondaryStyle,
),
Text(snapshotText, style: _secondaryStyle),
],
],
),
Expand All @@ -684,10 +666,7 @@ class _AllTweetCardWidgetState extends ConsumerState<AllTweetCardWidget> {
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
BuildSmallProfileImage(
mediaId: notification.mediaUrl,
radius: 20,
),
BuildSmallProfileImage(mediaId: notification.mediaUrl, radius: 20),
const SizedBox(width: 12),
Expanded(
child: Column(
Expand All @@ -702,10 +681,7 @@ class _AllTweetCardWidgetState extends ConsumerState<AllTweetCardWidget> {
text: '${notification.actor.name} ',
style: _nameStyle,
children: [
TextSpan(
text: description,
style: _secondaryStyle,
),
TextSpan(text: description, style: _secondaryStyle),
],
),
),
Expand Down Expand Up @@ -819,4 +795,4 @@ class _AllTweetCardWidgetState extends ConsumerState<AllTweetCardWidget> {
}
return _buildConversationCard();
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:dio/dio.dart';
import 'package:lite_x/core/theme/palette.dart';
import 'package:lite_x/core/theme/Palette.dart';
import 'package:lite_x/core/providers/dio_interceptor.dart';
import 'package:lite_x/features/home/repositories/home_repository.dart';
import 'package:lite_x/features/home/view/screens/quote_composer_screen.dart';
Expand Down Expand Up @@ -245,12 +245,7 @@ class _InteractionBarState extends ConsumerState<InteractionBar> {
size: 18,
),
),
_buildButton(
Icons.ios_share_outlined,
0,
Palette.reply,
_handleQuote,
),
_buildButton(Icons.ios_share_outlined, 0, Palette.reply, _handleQuote),
],
);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:lite_x/core/theme/palette.dart';
import 'package:lite_x/core/theme/Palette.dart';
import 'package:lite_x/core/providers/dio_interceptor.dart';
import 'package:lite_x/features/profile/models/shared.dart';
import 'package:lite_x/features/home/repositories/home_repository.dart';
Expand Down Expand Up @@ -58,9 +58,9 @@ class _MentionTweetCardState extends ConsumerState<MentionTweetCard> {

void _showSnack(String message) {
if (!mounted) return;
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text(message)),
);
ScaffoldMessenger.of(
context,
).showSnackBar(SnackBar(content: Text(message)));
}

void _openTweetDetail() {
Expand All @@ -75,7 +75,9 @@ class _MentionTweetCardState extends ConsumerState<MentionTweetCard> {
_showSnack('User profile not available');
return;
}
Navigator.of(context).pushNamed('/profile', arguments: {'username': username});
Navigator.of(
context,
).pushNamed('/profile', arguments: {'username': username});
}

Future<void> _openQuoteComposer() async {
Expand Down Expand Up @@ -304,9 +306,7 @@ class _MentionTweetCardState extends ConsumerState<MentionTweetCard> {
margin: const EdgeInsets.symmetric(vertical: 8.0, horizontal: 16.0),
padding: padding ?? const EdgeInsets.symmetric(vertical: 12.0),
decoration: const BoxDecoration(
border: Border(
bottom: BorderSide(color: Colors.white, width: 0.5),
),
border: Border(bottom: BorderSide(color: Colors.white, width: 0.5)),
),
child: child,
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:lite_x/core/theme/palette.dart';
import 'package:lite_x/core/theme/Palette.dart';

class AllEmptyStateWidget extends StatelessWidget {
const AllEmptyStateWidget({super.key});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:lite_x/core/theme/palette.dart';
import 'package:lite_x/core/theme/Palette.dart';

class MentionsEmptyStateWidget extends StatelessWidget {
const MentionsEmptyStateWidget({super.key});
Expand Down Expand Up @@ -41,4 +41,4 @@ class MentionsEmptyStateWidget extends StatelessWidget {
),
);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:lite_x/core/theme/palette.dart';
import 'package:lite_x/core/theme/Palette.dart';

class VerifiedEmptyStateWidget extends StatelessWidget {
const VerifiedEmptyStateWidget({super.key});
Expand Down
11 changes: 3 additions & 8 deletions lib/features/notifications/view/widgets/notification_tabs.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:lite_x/core/theme/palette.dart';
import 'package:lite_x/core/theme/Palette.dart';
import 'package:lite_x/features/notifications/notification_fcm_service.dart';
import 'tabs/all_notifications.dart';
import 'tabs/verified_notifications.dart';
Expand Down Expand Up @@ -70,12 +70,7 @@ class _NotificationTabsState extends ConsumerState<NotificationTabs>
Container(
decoration: BoxDecoration(
color: Palette.background,
border: Border(
bottom: BorderSide(
color: Palette.border,
width: 1,
),
),
border: Border(bottom: BorderSide(color: Palette.border, width: 1)),
),
height: 53,
child: Row(
Expand Down Expand Up @@ -141,4 +136,4 @@ class _NotificationTabsState extends ConsumerState<NotificationTabs>
],
);
}
}
}
Loading
Loading