Skip to content

Commit

Permalink
Upgrade flutter, packages, compileSdk and retry geocoding when it fai…
Browse files Browse the repository at this point in the history
…ls on first attempt
  • Loading branch information
KyleKun committed Dec 4, 2023
1 parent 314fe69 commit 52c5d54
Show file tree
Hide file tree
Showing 14 changed files with 237 additions and 207 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## v1.5.3 - 10/2023
## v1.6.0 - 12/2023
- Added option to receive persistent notifications
- Added option to change calendar days color for colorblind users
- Added option to disable date filter in experimental file picker
Expand All @@ -7,6 +7,7 @@
- Store location metadata in video when geotagging is enabled
- Autofocus and capitalize first letter of custom locale and subtitles text fields
- Remember last recording settings (which camera was used and geotagging checkbox)
- Automatically retry geotagging when it fails for the first time

## v1.5.2 - 09/2023
- Added quick trim shortcuts in save video page for a more precise editing
Expand Down
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if (keystorePropertiesFile.exists()) {
}

android {
compileSdkVersion 33
compileSdkVersion 34
ndkVersion "25.1.8937393"

compileOptions {
Expand Down
6 changes: 3 additions & 3 deletions lib/lang/cs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Map<String, String> cs = {
'Děkuji moc za používání aplikace!\n\nPokud chcete podpořit vývoj,\nneváhejte přispět ^^',
'donationPageTitle': 'Podpořte vývoj aplikace',
'about': 'O aplikaci',
'appVersion': 'Verze 1.5.3',
'appVersion': 'Verze 1.6.0',
'record': 'Record',
'createMovie': 'Vytvoření videa',
'settings': 'Nastavení',
Expand Down Expand Up @@ -114,7 +114,7 @@ const Map<String, String> cs = {
'cancelMovieCreation': 'Zrušit vytvoření filmu',
'cancelMovieDesc': 'Opravdu chcete zrušit vytvoření filmu?',
'reportError': 'Nahlásit chybu',
'errorMailSubject': '[One Second Diary - v1.5.3] Zpráva o chybách v aplikaci',
'errorMailSubject': '[One Second Diary - v1.6.0] Zpráva o chybách v aplikaci',
'errorMailBody':
'Popište chybu, na kterou jste narazili, a kroky k jejímu reprodukování. Děkuju!',
'oops': 'Oops!',
Expand Down Expand Up @@ -188,7 +188,7 @@ const Map<String, String> cs = {
'sendLogsDescription':
'Pokud se potýkáte s problémem, klepněte prosím na "Ano", abyste zahrnuli záznamy, které mi pomohou problém najít. Pokud jde o návrh funkce nebo jiné téma, klepněte prosím na "Ne".',
'whatsNewDescv152':
'Verze 1.5.3 přinesla několik oprav a vylepšení!\n\nPodívejte se na následujících stránkách 😊',
'Verze 1.6.0 přinesla několik oprav a vylepšení!\n\nPodívejte se na následujících stránkách 😊',
'feat1v152': 'Rychlejší zpracování videa',
'featDesc1v152': 'Úprava velkých videí je nyní mnohem rychlejší 🚀',
'feat2v152': 'Vylepšené zastřihávání videa',
Expand Down
4 changes: 2 additions & 2 deletions lib/lang/de.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Map<String, String> de = {
'Vielen Dank!\n\nWenn Du die App unterstützen möchtest,\nfreuen wir uns auf Deine Spende ^^',
'donationPageTitle': 'App-Entwicklung unterstützen',
'about': 'Über die App',
'appVersion': 'Version 1.5.3',
'appVersion': 'Version 1.6.0',
'record': 'Aufnehmen',
'createMovie': 'Film erstellen',
'settings': 'Einstellungen',
Expand Down Expand Up @@ -185,7 +185,7 @@ const Map<String, String> de = {
'sendLogsDescription':
'Wenn Sie auf ein Problem stoßen, tippen Sie bitte auf "Ja", um die Protokolle einzuschließen, die mir helfen, das Problem zu finden. Wenn es sich um einen Verbesserungsvorschlag oder ein anderes Thema handelt, tippen Sie bitte auf "Nein".',
'whatsNewDescv152':
'Version 1.5.3 brachte mehrere Korrekturen und Verbesserungen!\n\nSchauen Sie sich die nächsten Seiten an 😊',
'Version 1.6.0 brachte mehrere Korrekturen und Verbesserungen!\n\nSchauen Sie sich die nächsten Seiten an 😊',
'feat1v152': 'Schnellere Videobearbeitung',
'featDesc1v152': 'Die Bearbeitung großer Videos geht jetzt viel schneller 🚀',
'feat2v152': 'Verbessertes Videoschneiden',
Expand Down
6 changes: 3 additions & 3 deletions lib/lang/en.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Map<String, String> en = {
'Thank you so much for using the app!\n\nIf you wish to support the development,\nfeel free to make a donation ^^',
'donationPageTitle': 'Support app development',
'about': 'About',
'appVersion': 'Version 1.5.3',
'appVersion': 'Version 1.6.0',
'record': 'Record',
'createMovie': 'Create movie',
'settings': 'Settings',
Expand Down Expand Up @@ -116,7 +116,7 @@ const Map<String, String> en = {
'cancelMovieCreation': 'Cancel movie creation',
'cancelMovieDesc': 'Are you sure you want to cancel the movie creation?',
'reportError': 'Report Error',
'errorMailSubject': '[One Second Diary - v1.5.3] App Error Report',
'errorMailSubject': '[One Second Diary - v1.6.0] App Error Report',
'errorMailBody':
'Please describe the error you encountered and steps to reproduce it. Thank you!',
'oops': 'Oops!',
Expand Down Expand Up @@ -189,7 +189,7 @@ const Map<String, String> en = {
'sendLogsDescription':
'If you are facing an issue, please tap "Yes" to include the logs that will help me find the problem. If it\'s a feature suggestion or other topic, please tap "No".',
'whatsNewDescv152':
'Version 1.5.3 brought several fixes and improvements!\n\nCheck it out in the next pages 😊',
'Version 1.6.0 brought several fixes and improvements!\n\nCheck it out in the next pages 😊',
'feat1v152': 'Faster Video Processing',
'featDesc1v152': 'Editing large videos is now much faster 🚀',
'feat2v152': 'Improved Video Trimming',
Expand Down
4 changes: 2 additions & 2 deletions lib/lang/es.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Map<String, String> es = {
'¡Muchas gracias por usar la aplicación!\n\Si deseas ayudar al desarrollo y contribuir para seguir mejorando nuestros servidores, \napóyanos con una donación ^^.',
'donationPageTitle': '¡Apóyanos!',
'about': 'Acerca de',
'appVersion': 'Versión 1.5.3',
'appVersion': 'Versión 1.6.0',
'record': 'Grabar',
'createMovie': 'Crear película',
'settings': 'Ajustes',
Expand Down Expand Up @@ -188,7 +188,7 @@ const Map<String, String> es = {
'sendLogsDescription':
'Si te enfrentas a un problema, por favor toca "Sí" para incluir los registros que me ayudarán a encontrar el problema. Si es una sugerencia de función u otro tema, por favor toca "No".',
'whatsNewDescv152':
'¡La versión 1.5.3 trajo varias correcciones y mejoras!\n\n¡Échale un vistazo en las próximas páginas 😊!',
'¡La versión 1.6.0 trajo varias correcciones y mejoras!\n\n¡Échale un vistazo en las próximas páginas 😊!',
'feat1v152': 'Procesamiento de video más rápido',
'featDesc1v152': 'Editar videos grandes es ahora mucho más rápido 🚀',
'feat2v152': 'Mejora en el recorte de video',
Expand Down
4 changes: 2 additions & 2 deletions lib/lang/fr.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Map<String, String> fr = {
"Merci beaucoup d'utiliser l'application !\n\nSi vous souhaitez soutenir le développement,\nn'hésitez pas à faire un don ^^",
'donationPageTitle': 'Soutenir le développement',
'about': 'À propos',
'appVersion': 'Version 1.5.3',
'appVersion': 'Version 1.6.0',
'record': 'Enregistrement',
'createMovie': 'Créer un film',
'settings': 'Paramètres',
Expand Down Expand Up @@ -190,7 +190,7 @@ const Map<String, String> fr = {
'sendLogsDescription':
'Si vous rencontrez un problème, veuillez appuyer sur "Oui" pour inclure les journaux qui m\'aideront à trouver le problème. Si c\'est une suggestion de fonctionnalité ou un autre sujet, veuillez appuyer sur "Non".',
'whatsNewDescv152':
'La version 1.5.3 a apporté plusieurs corrections et améliorations!\n\nDécouvrez-le dans les pages suivantes 😊',
'La version 1.6.0 a apporté plusieurs corrections et améliorations!\n\nDécouvrez-le dans les pages suivantes 😊',
'feat1v152': 'Traitement vidéo plus rapide',
'featDesc1v152': 'L\'édition de grandes vidéos est maintenant beaucoup plus rapide 🚀',
'feat2v152': 'Amélioration de la découpe vidéo',
Expand Down
4 changes: 2 additions & 2 deletions lib/lang/id.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Map<String, String> id = {
'Terima kasih sudah menggunakan aplikasi ini!\n\nJika Anda ingin mendukung pembuatan aplikasi ini, jangan sungkan untuk berdonasi^^.',
'donationPageTitle': 'Dukung pembuatan aplikasi',
'about': 'Tentang',
'appVersion': 'Versi 1.5.3',
'appVersion': 'Versi 1.6.0',
'record': 'Rekam',
'createMovie': 'Buat video',
'settings': 'Pengaturan',
Expand Down Expand Up @@ -186,7 +186,7 @@ const Map<String, String> id = {
'sendLogsDescription':
'Jika Anda menghadapi masalah, silakan tekan "Ya" untuk menyertakan log yang akan membantu saya menemukan masalahnya. Jika ini adalah saran fitur atau topik lain, silakan tekan "Tidak".',
'whatsNewDescv152':
'Versi 1.5.3 membawa berbagai perbaikan dan peningkatan!\n\nLihat di halaman berikutnya 😊',
'Versi 1.6.0 membawa berbagai perbaikan dan peningkatan!\n\nLihat di halaman berikutnya 😊',
'feat1v152': 'Pemrosesan Video Lebih Cepat',
'featDesc1v152': 'Mengedit video besar kini jauh lebih cepat 🚀',
'feat2v152': 'Pemotongan Video Ditingkatkan',
Expand Down
6 changes: 3 additions & 3 deletions lib/lang/pt.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Map<String, String> pt = {
'Muito obrigado por usar o app!\n\nSe desejar apoiar o desenvolvimento, sinta-se livre para fazer uma doação ^^',
'donationPageTitle': 'Apoiar o desenvolvimento',
'about': 'Sobre',
'appVersion': 'Versão 1.5.3',
'appVersion': 'Versão 1.6.0',
'record': 'Gravar',
'createMovie': 'Criar filme',
'settings': 'Configurações',
Expand Down Expand Up @@ -114,7 +114,7 @@ const Map<String, String> pt = {
'cancelMovieCreation': 'Cancelar criação de filme',
'cancelMovieDesc': 'Você tem certeza que deseja cancelar a criação do filme?',
'reportError': 'Relatar erro',
'errorMailSubject': '[One Second Diary - v1.5.3] Relatório de erro',
'errorMailSubject': '[One Second Diary - v1.6.0] Relatório de erro',
'errorMailBody':
'Por favor descreva o erro e quais passos executar para reproduzir o mesmo. Obrigado!',
'oops': 'Oops!',
Expand Down Expand Up @@ -188,7 +188,7 @@ const Map<String, String> pt = {
'sendLogsDescription':
'Se você está enfrentando um problema, por favor toque em "Sim" para incluir os logs que me ajudarão a encontrar o problema. Se for uma sugestão ou outro tópico, por favor toque em "Não".',
'whatsNewDescv152':
'A versão 1.5.3 trouxe várias correções e melhorias!\n\nConfira nas próximas páginas 😊',
'A versão 1.6.0 trouxe várias correções e melhorias!\n\nConfira nas próximas páginas 😊',
'feat1v152': 'Processamento Mais Rápido',
'featDesc1v152': 'Editar vídeos grandes ficou muito mais rápido 🚀',
'feat2v152': 'Melhoria na Edição de Vídeos',
Expand Down
6 changes: 3 additions & 3 deletions lib/lang/ru.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Map<String, String> ru = {
'Благодарю тебя за те мгновения, которые ты разделил(а) с приложением! \n\nТы можешь поддержать разработку,\nотправив донат ^^',
'donationPageTitle': 'Поддержать разработку приложения',
'about': 'О приложении',
'appVersion': 'Версия 1.5.3',
'appVersion': 'Версия 1.6.0',
'record': 'Записать',
'createMovie': 'Создать фильм',
'settings': 'Настройки',
Expand Down Expand Up @@ -114,7 +114,7 @@ const Map<String, String> ru = {
'cancelMovieCreation': 'Отменить создание фильма',
'cancelMovieDesc': 'Новый фильм будет удален, продолжить?',
'reportError': 'Сообщить об ошибке',
'errorMailSubject': '[One Second Diary - v1.5.3] Сообщить об ошибке',
'errorMailSubject': '[One Second Diary - v1.6.0] Сообщить об ошибке',
'errorMailBody':
'Пожалуйста, опиши ошибку, с которой ты столкнулся(лась), и шаги по её воспроизведению. Спасибо!',
'oops': 'Упс!',
Expand Down Expand Up @@ -187,7 +187,7 @@ const Map<String, String> ru = {
'sendLogsDescription':
'Если у вас возникла проблема, пожалуйста, нажмите "Да", чтобы включить журналы, которые помогут мне найти проблему. Если это предложение по функционалу или другая тема, пожалуйста, нажмите "Нет".',
'whatsNewDescv152':
'Версия 1.5.3 принесла несколько исправлений и улучшений!\n\nПосмотрите на следующих страницах 😊',
'Версия 1.6.0 принесла несколько исправлений и улучшений!\n\nПосмотрите на следующих страницах 😊',
'feat1v152': 'Быстрее обработка видео',
'featDesc1v152': 'Редактирование больших видео теперь намного быстрее 🚀',
'feat2v152': 'Улучшенное обрезание видео',
Expand Down
4 changes: 2 additions & 2 deletions lib/lang/zh.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const Map<String, String> zh = {
'donateMsg': '非常感谢您使用该应用程序!如果你想支持开发,欢迎您随时捐款 ^^',
'donationPageTitle': '支持应用开发',
'about': '关于',
'appVersion': '版本信息 1.5.3',
'appVersion': '版本信息 1.6.0',
'record': '记录',
'createMovie': '创建视频',
'settings': '设置',
Expand Down Expand Up @@ -165,7 +165,7 @@ const Map<String, String> zh = {
'change': '更改',
'sendLogs': '发送日志?',
'sendLogsDescription': '如果您遇到问题,请点击“是”以包含将帮助我找到问题的日志。如果这是一个功能建议或其他话题,请点击“否”。',
'whatsNewDescv152': '1.5.3版本带来了几个修复和改进\n\n在接下来的页面中查看 😊',
'whatsNewDescv152': '1.6.0版本带来了几个修复和改进\n\n在接下来的页面中查看 😊',
'feat1v152': '更快的视频处理',
'featDesc1v152': '现在编辑大视频更加快速 🚀',
'feat2v152': '改进的视频剪辑',
Expand Down
81 changes: 47 additions & 34 deletions lib/pages/save_video/save_video_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -200,41 +200,54 @@ class _SaveVideoPageState extends State<SaveVideoPage> {
}

Future<void> _getAddressFromLatLng(Position position) async {
await placemarkFromCoordinates(
_currentPosition!.latitude,
_currentPosition!.longitude,
localeIdentifier: Get.locale!.languageCode,
).then((List<Placemark> placemarks) {
final Placemark place = placemarks[0];
String city = '';
if (place.locality?.isNotEmpty == true) {
city = place.locality!;
} else if (place.subAdministrativeArea?.isNotEmpty == true) {
city = place.subAdministrativeArea!;
} else if (place.administrativeArea?.isNotEmpty == true) {
city = place.administrativeArea!;
}
setState(() {
_currentAddress = '$city, ${place.country}';
});

Utils.logError('[Geolocation] - Location obtained successfully!');
}).catchError((e) {
Utils.logError('[Geolocation] - Failed to decode location: $e');
if (isGeotaggingEnabled) {
toggleGeotaggingStatus();
const int maxAttempts = 3;
int attempts = 0;

while (attempts < maxAttempts) {
try {
await placemarkFromCoordinates(
_currentPosition!.latitude,
_currentPosition!.longitude,
localeIdentifier: Get.locale!.languageCode,
).then((List<Placemark> placemarks) {
final Placemark place = placemarks[0];
String city = '';
if (place.locality?.isNotEmpty == true) {
city = place.locality!;
} else if (place.subAdministrativeArea?.isNotEmpty == true) {
city = place.subAdministrativeArea!;
} else if (place.administrativeArea?.isNotEmpty == true) {
city = place.administrativeArea!;
}
setState(() {
_currentAddress = '$city, ${place.country}';
});
Utils.logInfo('[Geolocation] - Location obtained successfully!');
});
break;
} catch (e) {
attempts++;
if (attempts == maxAttempts) {
print('Function failed after $maxAttempts attempts: $e');
if (isGeotaggingEnabled) {
toggleGeotaggingStatus();
}
setState(() {
_isLocationProcessing = false;
});
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
'locationServiceError'.tr,
),
),
);
} else {
Utils.logError('[Geolocation] - Failed to decode location (attempt $attempts): $e');
await Future.delayed(const Duration(seconds: 1));
}
}
setState(() {
_isLocationProcessing = false;
});
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
'locationServiceError'.tr,
),
),
);
});
}
}

void changeColor(Color color) {
Expand Down
Loading

0 comments on commit 52c5d54

Please sign in to comment.