Skip to content

Commit

Permalink
Add refresh code button (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
EwuUwe authored May 18, 2024
1 parent 02050e1 commit beefe3d
Show file tree
Hide file tree
Showing 7 changed files with 296 additions and 267 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apk:
apk: ## Build apk
flutter build apk --split-per-abi --release
flutter build appbundle --release

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
iyox Wormhole is a file-sharing application presented in [Material You](https://m3.material.io/) style.
It is a fork of [this](https://gitlab.com/lukas-heiligenbrunner/wormhole) project.


[![built with garnix](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgarnix.io%2Fapi%2Fbadges%2Fiyox-studios%2Fiyox-Wormhole%3Fbranch%3Dmain)](https://garnix.io)
[<img src="https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png" alt="Get it on Google Play Store" height="75">](https://play.google.com/store/apps/details?id=com.iyox.wormhole)[<img src="https://gitlab.com/IzzyOnDroid/repo/-/raw/master/assets/IzzyOnDroid.png" alt="Get it on IzzyOnDroid" height="75">](https://apt.izzysoft.de/packages/com.iyox.wormhole)


Expand Down
2 changes: 1 addition & 1 deletion fastlane/Appfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
json_key_file("fastlane/google-play-secret.json")
package_name("com.iyox.wormhole") # e.g. com.krausefx.app
package_name("com.iyox.wormhole")
20 changes: 17 additions & 3 deletions lib/pages/sending_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ class _SendingPageState extends State<SendingPage> {
),
),
),
IconButton(
onPressed: () => {_refreshCode()},
icon: const Icon(Icons.refresh))
],
),
);
Expand All @@ -190,8 +193,8 @@ class _SendingPageState extends State<SendingPage> {
borderRadius: BorderRadius.circular(18),
))
: Padding(
padding: const EdgeInsets.all(20),
child: Column(
padding: const EdgeInsets.all(20),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Card(
Expand Down Expand Up @@ -237,9 +240,13 @@ class _SendingPageState extends State<SendingPage> {
)),
),
),
const Gap(10),
IconButton(
onPressed: () => {_refreshCode()},
icon: const Icon(Icons.refresh))
],
),
),
),
);
}

Expand Down Expand Up @@ -289,4 +296,11 @@ class _SendingPageState extends State<SendingPage> {
ServerConfig(rendezvousUrl: rendezvousUrl, transitUrl: transitUrl);
return serverConfig;
}

void _refreshCode() {
setState(() {
codeText = '';
});
_startSending();
}
}
Loading

0 comments on commit beefe3d

Please sign in to comment.