Skip to content

Commit

Permalink
Merge branch 'Subscription_For-you'
Browse files Browse the repository at this point in the history
# Conflicts:
#	lib/status.dart
#	lib/tweet/conversation.dart
  • Loading branch information
davo3078 committed Aug 29, 2023
2 parents d6e71aa + 06d4908 commit a135515
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions lib/profile/_tweets.dart
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ class _ProfileTweetsState extends State<ProfileTweets> with AutomaticKeepAliveCl
addAutomaticKeepAlives: false,
builderDelegate: PagedChildBuilderDelegate(
itemBuilder: (context, chain, index) {
return TweetConversation(
id: chain.id, tweets: chain.tweets, username: widget.user.screenName!, isPinned: chain.isPinned);
return TweetConversation(id: chain.id, tweets: chain.tweets,
username: widget.user.screenName!, isPinned: chain.isPinned);
},
firstPageErrorIndicatorBuilder: (context) => FullPageErrorWidget(
error: _pagingController.error[0],
Expand Down
9 changes: 5 additions & 4 deletions lib/status.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import 'package:scroll_to_index/scroll_to_index.dart';
class StatusScreenArguments {
final String id;
final String? username;
final bool tweetOpened;
final tweetOpened;

StatusScreenArguments({required this.id, required this.username, this.tweetOpened = false});
StatusScreenArguments({required this.id, required this.username, this.tweetOpened});

@override
String toString() {
Expand All @@ -31,7 +31,7 @@ class StatusScreen extends StatelessWidget {
Widget build(BuildContext context) {
final args = ModalRoute.of(context)!.settings.arguments as StatusScreenArguments;

return _StatusScreen(username: args.username, id: args.id, tweetOpened: args.tweetOpened);
return _StatusScreen(username: args.username, id: args.id, tweetOpened : args.tweetOpened);
}
}

Expand Down Expand Up @@ -123,7 +123,8 @@ class _StatusScreenState extends State<_StatusScreen> {
controller: _scrollController,
index: index,
highlightColor: Colors.white.withOpacity(1),
child: TweetConversation(id: chain.id, tweets: chain.tweets, username: null, isPinned: chain.isPinned, tweetOpened: widget.tweetOpened),
child: TweetConversation(id: chain.id, tweets: chain.tweets,
username: null, isPinned: chain.isPinned, tweetOpened : widget.tweetOpened),
);
},
firstPageErrorIndicatorBuilder: (context) => FullPageErrorWidget(
Expand Down
12 changes: 5 additions & 7 deletions lib/tweet/conversation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ class TweetConversation extends StatefulWidget {
final List<TweetWithCard> tweets;
final tweetOpened;

const TweetConversation(
{Key? key, required this.id, required this.username, required this.isPinned, required this.tweets, this.tweetOpened=false})
const TweetConversation({Key? key, required this.id, required this.username,
required this.isPinned, required this.tweets, this.tweetOpened=false})
: super(key: key);

@override
Expand All @@ -22,9 +22,8 @@ class _TweetConversationState extends State<TweetConversation> {
@override
Widget build(BuildContext context) {
if (widget.tweets.length == 1) {
return TweetTile(
clickable: true, tweet: widget.tweets.first, currentUsername: widget.username,
isPinned: widget.isPinned,tweetOpened: widget.tweetOpened);
return TweetTile(clickable: true, tweet: widget.tweets.first, currentUsername: widget.username,
isPinned: widget.isPinned, tweetOpened : widget.tweetOpened);
}

var tiles = [];
Expand All @@ -37,8 +36,7 @@ class _TweetConversationState extends State<TweetConversation> {
tweet: tweets[i],
currentUsername: widget.username,
isPinned: widget.isPinned,
isThread: i == 0,
tweetOpened: widget.tweetOpened));
isThread: i == 0));
}

return Container(
Expand Down

0 comments on commit a135515

Please sign in to comment.