mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 15:57:25 +00:00
format code
This commit is contained in:
@@ -45,7 +45,7 @@ class _ComicPageState extends LoadingState<ComicPage, ComicDetails>
|
||||
void updateHistory() async {
|
||||
var newHistory = await HistoryManager()
|
||||
.find(widget.id, ComicType(widget.sourceKey.hashCode));
|
||||
if(newHistory?.ep != history?.ep || newHistory?.page != history?.page) {
|
||||
if (newHistory?.ep != history?.ep || newHistory?.page != history?.page) {
|
||||
history = newHistory;
|
||||
update();
|
||||
}
|
||||
@@ -249,7 +249,7 @@ class _ComicPageState extends LoadingState<ComicPage, ComicDetails>
|
||||
onPressed: continueRead,
|
||||
iconColor: context.useTextColor(Colors.yellow),
|
||||
),
|
||||
if(!isMobile || hasHistory)
|
||||
if (!isMobile || hasHistory)
|
||||
_ActionButton(
|
||||
icon: const Icon(Icons.play_circle_outline),
|
||||
text: 'Start'.tl,
|
||||
@@ -268,7 +268,9 @@ class _ComicPageState extends LoadingState<ComicPage, ComicDetails>
|
||||
icon: const Icon(Icons.favorite_border),
|
||||
activeIcon: const Icon(Icons.favorite),
|
||||
isActive: isLiked,
|
||||
text: ((data!.likesCount!=null) ?(data!.likesCount!+(isLiked?1:0)) :(isLiked ? 'Liked'.tl : 'Like'.tl))
|
||||
text: ((data!.likesCount != null)
|
||||
? (data!.likesCount! + (isLiked ? 1 : 0))
|
||||
: (isLiked ? 'Liked'.tl : 'Like'.tl))
|
||||
.toString(),
|
||||
isLoading: isLiking,
|
||||
onPressed: likeOrUnlike,
|
||||
|
@@ -107,7 +107,7 @@ class _ReaderScaffoldState extends State<_ReaderScaffold> {
|
||||
}
|
||||
|
||||
void openOrClose() {
|
||||
if(!_isOpen) {
|
||||
if (!_isOpen) {
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
|
||||
} else {
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive);
|
||||
@@ -147,7 +147,9 @@ class _ReaderScaffoldState extends State<_ReaderScaffold> {
|
||||
),
|
||||
AnimatedPositioned(
|
||||
duration: const Duration(milliseconds: 180),
|
||||
bottom: _isOpen ? 0 : -(kBottomBarHeight + MediaQuery.of(context).padding.bottom),
|
||||
bottom: _isOpen
|
||||
? 0
|
||||
: -(kBottomBarHeight + MediaQuery.of(context).padding.bottom),
|
||||
left: 0,
|
||||
right: 0,
|
||||
child: buildBottom(),
|
||||
@@ -218,7 +220,7 @@ class _ReaderScaffoldState extends State<_ReaderScaffold> {
|
||||
if (!context.reader.toPrevChapter()) {
|
||||
context.reader.toPage(1);
|
||||
} else {
|
||||
if(showFloatingButtonValue != 0) {
|
||||
if (showFloatingButtonValue != 0) {
|
||||
setState(() {
|
||||
showFloatingButtonValue = 0;
|
||||
});
|
||||
@@ -235,7 +237,7 @@ class _ReaderScaffoldState extends State<_ReaderScaffold> {
|
||||
if (!context.reader.toNextChapter()) {
|
||||
context.reader.toPage(context.reader.maxPage);
|
||||
} else {
|
||||
if(showFloatingButtonValue != 0) {
|
||||
if (showFloatingButtonValue != 0) {
|
||||
setState(() {
|
||||
showFloatingButtonValue = 0;
|
||||
});
|
||||
@@ -541,7 +543,7 @@ class _ReaderScaffoldState extends State<_ReaderScaffold> {
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
height: value.clamp(0, 58*3) / 3,
|
||||
height: value.clamp(0, 58 * 3) / 3,
|
||||
child: ColoredBox(
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
|
Reference in New Issue
Block a user