-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/develop' into feature/create-p…
…ost-before-community
- Loading branch information
Showing
9 changed files
with
98 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
const String currentVersion = '0.2.5-1+21'; | ||
const String currentVersion = '0.2.5-2+22'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_bloc/flutter_bloc.dart'; | ||
import 'package:lemmy_api_client/v3.dart'; | ||
import 'package:swipeable_page_route/swipeable_page_route.dart'; | ||
import 'package:thunder/account/bloc/account_bloc.dart'; | ||
import 'package:thunder/core/auth/bloc/auth_bloc.dart'; | ||
import 'package:thunder/core/models/post_view_media.dart'; | ||
import 'package:thunder/post/bloc/post_bloc.dart'; | ||
import 'package:thunder/post/pages/post_page.dart'; | ||
import 'package:thunder/thunder/bloc/thunder_bloc.dart'; | ||
import 'package:thunder/utils/swipe.dart'; | ||
|
||
Future<void> navigateToComment(BuildContext context, CommentView commentView) async { | ||
AccountBloc accountBloc = context.read<AccountBloc>(); | ||
AuthBloc authBloc = context.read<AuthBloc>(); | ||
ThunderBloc thunderBloc = context.read<ThunderBloc>(); | ||
|
||
final ThunderState state = context.read<ThunderBloc>().state; | ||
final bool reduceAnimations = state.reduceAnimations; | ||
|
||
// To to specific post for now, in the future, will be best to scroll to the position of the comment | ||
await Navigator.of(context).push( | ||
SwipeablePageRoute( | ||
transitionDuration: reduceAnimations ? const Duration(milliseconds: 100) : null, | ||
backGestureDetectionWidth: 45, | ||
canOnlySwipeFromEdge: disableFullPageSwipe(isUserLoggedIn: authBloc.state.isLoggedIn, state: thunderBloc.state, isPostPage: true) || !state.enableFullScreenSwipeNavigationGesture, | ||
builder: (context) => MultiBlocProvider( | ||
providers: [ | ||
BlocProvider.value(value: accountBloc), | ||
BlocProvider.value(value: authBloc), | ||
BlocProvider.value(value: thunderBloc), | ||
BlocProvider(create: (context) => PostBloc()), | ||
], | ||
child: PostPage( | ||
selectedCommentId: commentView.comment.id, | ||
selectedCommentPath: commentView.comment.path, | ||
postId: commentView.post.id, | ||
onPostUpdated: (PostViewMedia postViewMedia) => {}, | ||
), | ||
), | ||
), | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters