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
2 changes: 1 addition & 1 deletion lib/screens/item/widgets/item_screen_background.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class _ItemScreenBackgroundState extends State<ItemScreenBackground> {
child: AnimatedCrossFade(
duration: AppDurations.ms400,
crossFadeState: !_overrideCommentsStatus &&
state.status == CommentsStatus.inProgress
state.status != CommentsStatus.allLoaded
? CrossFadeState.showFirst
: CrossFadeState.showSecond,
firstChild: Stack(
Expand Down
143 changes: 72 additions & 71 deletions lib/screens/item/widgets/main_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -113,81 +113,82 @@ class MainView extends StatelessWidget {
),
);
} else if (index == state.comments.length + 1) {
if ((state.status == CommentsStatus.allLoaded &&
state.comments.isNotEmpty) ||
state.onlyShowTargetComment) {
return Container(
color: Theme.of(context).canvasColor,
height: MediaQuery.of(context).size.height -
MediaQuery.of(context).padding.top,
padding: const EdgeInsets.symmetric(
horizontal: Dimens.pt48,
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
SizedBoxes.pt100,
if (preferenceState.isEyeCandyEnabled)
GestureDetector(
onTap: () => unawaited(
HapticFeedbackUtils.loadAndPlay(),
),
child: Center(
child: Padding(
padding:
const EdgeInsets.all(Dimens.pt24),
child: FaIcon(
FontAwesomeIcons.heartPulse,
applyTextScaling: false,
return Container(
color: Theme.of(context).canvasColor,
height: MediaQuery.of(context).size.height -
MediaQuery.of(context).padding.top,
padding: const EdgeInsets.symmetric(
horizontal: Dimens.pt48,
),
margin: EdgeInsets.only(
left: state.status == CommentsStatus.allLoaded
? Dimens.zero
: indentLineWidth,
),
child: state.status == CommentsStatus.allLoaded
? Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
SizedBoxes.pt100,
if (preferenceState.isEyeCandyEnabled)
GestureDetector(
onTap: () => unawaited(
HapticFeedbackUtils.loadAndPlay(),
),
child: Center(
child: Padding(
padding:
const EdgeInsets.all(Dimens.pt24),
child: FaIcon(
FontAwesomeIcons.heartPulse,
applyTextScaling: false,
color: Theme.of(context).hintColor,
size: Dimens.pt36,
),
),
),
)
else if (DateUtils.isMidnight)
Text(
'Time for bed',
style: TextStyle(
color: Theme.of(context).hintColor,
fontSize: TextDimens.pt10,
),
textScaler: TextScaler.noScaling,
textAlign: TextAlign.center,
)
else if (DateUtils.isTodayAnniversary)
Text(
'''Hacki turns ${DateUtils.yearsSinceFirstCommit} today!''',
style: TextStyle(
color: Theme.of(context).hintColor,
fontSize: TextDimens.pt10,
),
textScaler: TextScaler.noScaling,
textAlign: TextAlign.center,
)
else
Text(
Constants.happyFace,
style: TextStyle(
color: Theme.of(context).hintColor,
size: Dimens.pt36,
),
),
SizedBoxes.pt36,
Text(
context.read<CommentsCubit>().currentTips,
style: TextStyle(
fontSize: TextDimens.pt10,
color: Theme.of(context).hintColor,
),
textScaler: TextScaler.noScaling,
textAlign: TextAlign.center,
),
)
else if (DateUtils.isMidnight)
Text(
'Time for bed',
style: TextStyle(
color: Theme.of(context).hintColor,
fontSize: TextDimens.pt10,
),
textScaler: TextScaler.noScaling,
textAlign: TextAlign.center,
)
else if (DateUtils.isTodayAnniversary)
Text(
'''Hacki turns ${DateUtils.yearsSinceFirstCommit} today!''',
style: TextStyle(
color: Theme.of(context).hintColor,
fontSize: TextDimens.pt10,
),
textScaler: TextScaler.noScaling,
textAlign: TextAlign.center,
)
else
Text(
Constants.happyFace,
style: TextStyle(
color: Theme.of(context).hintColor,
),
),
SizedBoxes.pt36,
Text(
context.read<CommentsCubit>().currentTips,
style: TextStyle(
fontSize: TextDimens.pt10,
color: Theme.of(context).hintColor,
),
textScaler: TextScaler.noScaling,
textAlign: TextAlign.center,
),
],
),
);
} else {
return const SizedBox.shrink();
}
],
)
: const SizedBox.shrink(),
);
}

index = index - 1;
Expand Down