Skip to content

Commit

Permalink
Update version info positioning
Browse files Browse the repository at this point in the history
  • Loading branch information
duddu committed Oct 22, 2023
1 parent 545c090 commit d5be08d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.9.3
1.9.4
4 changes: 2 additions & 2 deletions integration_test/navigation.test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void main() {
await tester.scrollUntilVisible(
find.byType(BackToHomePageTextButton), 50);
(find
.widgetWithText(TextButton, '< ${locale.backToHome}')
.widgetWithText(TextButton, ' ${locale.backToHome}')
.evaluate()
.first
.widget as TextButton)
Expand Down Expand Up @@ -142,7 +142,7 @@ void main() {
await tester.scrollUntilVisible(
find.byType(BackToHomePageTextButton), 50);
(find
.widgetWithText(TextButton, '< ${locale.backToHome}')
.widgetWithText(TextButton, ' ${locale.backToHome}')
.evaluate()
.first
.widget as TextButton)
Expand Down
12 changes: 10 additions & 2 deletions lib/widgets/secondary_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ class SecondaryPage extends StatelessWidget {
final AppBar appBar;
final List<CenteredContainer> listViewChildren;

final int maxHeightFixedVersionInfo = 600;

@override
Widget build(BuildContext context) {
final CenteredContainer versionInfoContainer =
Expand All @@ -36,10 +38,16 @@ class SecondaryPage extends StatelessWidget {
BackToHomePageTextButton()
])
])),
if (style.isMobileScreenWidth(context)) versionInfoContainer
if (style.isMobileScreenWidth(context) ||
MediaQuery.of(context).size.height <=
maxHeightFixedVersionInfo)
versionInfoContainer
],
)),
if (!style.isMobileScreenWidth(context)) versionInfoContainer
if (!style.isMobileScreenWidth(context) &&
MediaQuery.of(context).size.height >
maxHeightFixedVersionInfo)
versionInfoContainer
]));
}
}
Expand Down
2 changes: 1 addition & 1 deletion web/download-release-asset.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<title>Download Sourdoc release asset</title>
<script>
const version = '1.9.3';
const version = '1.9.4';
const build = new URLSearchParams(window.location.search).get('build');
window.location.href = 'https://github.com/duddu/sourdoc/releases/download/v' + version + '/' + build + '-sourdoc-v' + version + '.tgz';
</script>
Expand Down
2 changes: 1 addition & 1 deletion web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<script async src="https://www.googletagmanager.com/gtag/js?id=G-ZS2J7KXZ0Q"></script>
<script defer src="gtm-gtag.js"></script>
<script>
const serviceWorkerVersion = '1.9.3';
const serviceWorkerVersion = '1.9.4';
</script>
<script defer src="flutter.js"></script>
</head>
Expand Down

0 comments on commit d5be08d

Please sign in to comment.