Skip to content

Commit

Permalink
Merge pull request #271 from dtube/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
tibfox authored Aug 21, 2022
2 parents 109e183 + 16aca42 commit d2886c2
Show file tree
Hide file tree
Showing 10 changed files with 84 additions and 90 deletions.
2 changes: 1 addition & 1 deletion lib/ui/pages/feeds/FeedTabContainer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ class _FeedMainPageState extends State<FeedMainPage>
Align(
alignment: Alignment.topLeft,
child: Padding(
padding: EdgeInsets.only(top: 6.h, left: 4.w),
padding: EdgeInsets.only(top: 10.h, left: 4.w),
//padding: EdgeInsets.only(top: 5.h),
child: OverlayText(
text: _tabNames[_selectedIndex],
Expand Down
22 changes: 11 additions & 11 deletions lib/ui/pages/feeds/cards/PostListCardLarge.dart
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ class PostInfoBaseRow extends StatelessWidget {
alignment: Alignment.center,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
widget.oc
Expand All @@ -501,12 +501,15 @@ class PostInfoBaseRow extends StatelessWidget {
child: OriginalContentIcon(),
)
: SizedBox(width: globalIconSizeSmall),
TagChip(
waitBeforeFadeIn: Duration(milliseconds: 600),
fadeInFromLeft: false,
tagName: widget.mainTag,
width: globals.mobileMode ? 14.w : 50,
fontStyle: Theme.of(context).textTheme.caption),
Padding(
padding: EdgeInsets.only(left: 8.0),
child: TagChip(
waitBeforeFadeIn: Duration(milliseconds: 600),
fadeInFromLeft: false,
tagName: widget.mainTag,
width: globals.mobileMode ? 14.w : 50,
fontStyle: Theme.of(context).textTheme.caption),
),
],
),
globals.keyPermissions.isEmpty
Expand Down Expand Up @@ -658,8 +661,6 @@ class PostInfoBaseRow extends StatelessWidget {
widget.defaultPostVotingWeight),
defaultTip: double.parse(
widget.defaultPostVotingTip),
postBloc: BlocProvider.of<PostBloc>(
context),
txBloc:
BlocProvider.of<TransactionBloc>(
context),
Expand Down Expand Up @@ -737,8 +738,7 @@ class PostInfoBaseRow extends StatelessWidget {
widget.defaultPostVotingWeight),
defaultTip: double.parse(
widget.defaultPostVotingTip),
postBloc: BlocProvider.of<PostBloc>(
context),

txBloc:
BlocProvider.of<TransactionBloc>(
context),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ class _VideoPlayerMomentsState extends State<VideoPlayerMoments> {
author: widget.feedItem.author,
link: widget.feedItem.link,
downvote: true,
postBloc: BlocProvider.of<PostBloc>(context),

txBloc: BlocProvider.of<TransactionBloc>(context),

//currentVT: state.vtBalance['v']! + 0.0,
Expand Down Expand Up @@ -341,8 +341,7 @@ class _VideoPlayerMomentsState extends State<VideoPlayerMoments> {
child: VotingDialog(
defaultVote: double.parse(
widget.momentsVotingWeight),
postBloc:
BlocProvider.of<PostBloc>(context),

txBloc: BlocProvider.of<TransactionBloc>(
context),
defaultTip: double.parse(
Expand Down
107 changes: 50 additions & 57 deletions lib/ui/pages/notifications/NotificationItem.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,71 +32,64 @@ class NotificationItem extends StatelessWidget {
Widget build(BuildContext context) {
return Padding(
padding: EdgeInsets.all(2.w),
child: SizedBox(
child: Container(
height: 15.h,
width: 100.w,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
DTubeFormCard(
childs: [
Row(
children: [
Container(
width: 25.w,
child: Column(
children: [
BlocProvider<UserBloc>(
create: (BuildContext context) =>
UserBloc(repository: UserRepositoryImpl()),
child: GestureDetector(
onTap: () {
navigateToUserDetailPage(
context, sender, () {});
},
child: AccountIconBase(
avatarSize: 15.w,
showVerified: true,
username: sender,
)),
),
Text(
sender,
style: Theme.of(context).textTheme.caption,
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
],
child: DTubeFormCard(
childs: [
Row(
children: [
Container(
width: 25.w,
child: Column(
children: [
BlocProvider<UserBloc>(
create: (BuildContext context) =>
UserBloc(repository: UserRepositoryImpl()),
child: GestureDetector(
onTap: () {
navigateToUserDetailPage(context, sender, () {});
},
child: AccountIconBase(
avatarSize: 15.w,
showVerified: true,
username: sender,
)),
),
),
SizedBox(
width: 3.w,
),
Container(
width: 47.w,
child: NotificationDetails(
sender: sender,
tx: tx,
username: username,
notificationType: notificationType,
Text(
sender,
style: Theme.of(context).textTheme.caption,
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
userNavigation || postNavigation
? FaIcon(
userNavigation
? FontAwesomeIcons.user
: FontAwesomeIcons.play,
size: 5.w,
)
: SizedBox(width: 0)
],
],
),
),
SizedBox(
width: 3.w,
),
Container(
width: 47.w,
child: NotificationDetails(
sender: sender,
tx: tx,
username: username,
notificationType: notificationType,
),
),
userNavigation || postNavigation
? FaIcon(
userNavigation
? FontAwesomeIcons.user
: FontAwesomeIcons.play,
size: 5.w,
)
: SizedBox(width: 0)
],
avoidAnimation: true,
waitBeforeFadeIn: Duration(milliseconds: 0),
),
],
avoidAnimation: true,
waitBeforeFadeIn: Duration(milliseconds: 0),
),
),
);
Expand Down
16 changes: 9 additions & 7 deletions lib/ui/pages/notifications/Notifications.dart
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,15 @@ class _NotificationTabContainerState extends State<NotificationTabContainer>
return Padding(
padding: const EdgeInsets.only(bottom: 8.0),
child: InkWell(
child: NotificationItem(
sender: notifications[pos].tx.sender,
tx: notifications[pos].tx,
username: widget.username,
userNavigation: _userNavigationPossible,
postNavigation: _postNavigationPossible,
notificationType: notificationType),
child: Center(
child: NotificationItem(
sender: notifications[pos].tx.sender,
tx: notifications[pos].tx,
username: widget.username,
userNavigation: _userNavigationPossible,
postNavigation: _postNavigationPossible,
notificationType: notificationType),
),
onTap: () {
if (_userNavigationPossible) {
navigateToUserDetailPage(
Expand Down
2 changes: 2 additions & 0 deletions lib/ui/pages/post/widgets/ReplyButton.dart
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ class _ReplyButtonState extends State<ReplyButton> {
Container(
width: 70.w,
child: TextField(
keyboardType: TextInputType.multiline,
maxLines: null,
autofocus: _replyPressed,
controller: _replyController,
cursorColor: globalRed,
Expand Down
2 changes: 0 additions & 2 deletions lib/ui/pages/post/widgets/VoteButtons.dart
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ class VotingButtonRow extends StatelessWidget {
defaultTip: widget.defaultVotingTip,
author: post.author,
link: post.link,
postBloc: postBloc,
txBloc: txBloc,
downvote: false,
//currentVT: state.vtBalance['v']! + 0.0,
Expand Down Expand Up @@ -352,7 +351,6 @@ class VotingButtonRow extends StatelessWidget {
author: post.author,
link: post.link,
downvote: true,
postBloc: postBloc,
txBloc: txBloc,
//currentVT: state.vtBalance['v']! + 0.0,
isPost: widget.isPost,
Expand Down
2 changes: 0 additions & 2 deletions lib/ui/pages/post/widgets/VotingDialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class VotingDialog extends StatefulWidget {
this.verticalModeCallbackVotingButtonsPressed,
this.okCallback,
this.cancelCallback,
required this.postBloc,
required this.txBloc,
required this.fixedDownvoteActivated,
required this.fixedDownvoteWeight})
Expand All @@ -48,7 +47,6 @@ class VotingDialog extends StatefulWidget {

final VoidCallback? okCallback;
final VoidCallback? cancelCallback;
final PostBloc postBloc;
final TransactionBloc txBloc;

@override
Expand Down
8 changes: 4 additions & 4 deletions lib/ui/pages/wallet/Pages/Rewards/RewardCard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:responsive_sizer/responsive_sizer.dart';

class RewardsCard extends StatefulWidget {
RewardsCard({Key? key, required this.reward, required this.parentWidget})
class RewardCard extends StatefulWidget {
RewardCard({Key? key, required this.reward, required this.parentWidget})
: super(key: key);

final Reward reward;
final Widget parentWidget;

@override
_RewardsCardState createState() => _RewardsCardState();
_RewardCardState createState() => _RewardCardState();
}

class _RewardsCardState extends State<RewardsCard>
class _RewardCardState extends State<RewardCard>
with AutomaticKeepAliveClientMixin {
double widthLabel = 25.w;
@override
Expand Down
8 changes: 5 additions & 3 deletions lib/ui/pages/wallet/Pages/Rewards/RewardsPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,11 @@ class _RewardsListState extends State<RewardsList> {
'rewards' + widget.rewardsState + 'listview'),
itemCount: _rewards.length,
itemBuilder: (ctx, pos) {
return RewardsCard(
reward: _rewards[pos],
parentWidget: this.widget,
return Center(
child: RewardCard(
reward: _rewards[pos],
parentWidget: this.widget,
),
);
});
}
Expand Down

0 comments on commit d2886c2

Please sign in to comment.