Merge pull request #783 from ente-io/change_log_4

Add change log for upcoming release
This commit is contained in:
Neeraj Gupta 2023-01-07 16:06:10 +05:30 committed by GitHub
commit cd2aba6480
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 50 additions and 41 deletions

View file

@ -8,6 +8,7 @@ import 'package:photos/core/network.dart';
import 'package:photos/services/notification_service.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:tuple/tuple.dart';
import 'package:url_launcher/url_launcher_string.dart';
class UpdateService {
UpdateService._privateConstructor();
@ -15,7 +16,7 @@ class UpdateService {
static final UpdateService instance = UpdateService._privateConstructor();
static const kUpdateAvailableShownTimeKey = "update_available_shown_time_key";
static const changeLogVersionKey = "update_change_log_key";
static const currentChangeLogVersion = 3;
static const currentChangeLogVersion = 4;
LatestVersionInfo? _latestVersion;
final _logger = Logger("UpdateService");
@ -137,15 +138,30 @@ class UpdateService {
);
}
return Platform.isAndroid
? const Tuple2(
"play store",
"https://play.google.com/store/apps/details?id=io.ente.photos",
)
? const Tuple2("play store", "market://details?id=io.ente.photos")
: const Tuple2(
"app store",
"https://apps.apple.com/in/app/ente-photos/id1542026904",
);
}
Future<void> launchReviewUrl() async {
// TODO: Replace with https://pub.dev/packages/in_app_review
final String url = getRateDetails().item2;
try {
await launchUrlString(url, mode: LaunchMode.externalApplication);
} catch (e) {
_logger.severe("Failed top open launch url $url", e);
// Fall back if we fail to open play-store market app on android
if (Platform.isAndroid && url.startsWith("market://")) {
launchUrlString(
"https://play.google.com/store/apps/details?id=io"
".ente.photos",
mode: LaunchMode.externalApplication)
.ignore();
}
}
}
}
class LatestVersionInfo {

View file

@ -6,7 +6,6 @@ import 'package:photos/ui/components/divider_widget.dart';
import 'package:photos/ui/components/models/button_type.dart';
import 'package:photos/ui/components/title_bar_title_widget.dart';
import 'package:photos/ui/notification/update/change_log_entry.dart';
import 'package:url_launcher/url_launcher_string.dart';
class ChangeLogPage extends StatefulWidget {
const ChangeLogPage({
@ -85,9 +84,7 @@ class _ChangeLogPageState extends State<ChangeLogPage> {
icon: Icons.favorite_rounded,
iconColor: enteColorScheme.primary500,
onTap: () async {
launchUrlString(
UpdateService.instance.getRateDetails().item2,
);
await UpdateService.instance.launchReviewUrl();
},
),
const SizedBox(height: 8),
@ -106,42 +103,49 @@ class _ChangeLogPageState extends State<ChangeLogPage> {
final List<ChangeLogEntry> items = [];
items.add(
ChangeLogEntry(
"Collect photos from anyone!",
"You can now enable \"Allow adding photos\" under shared link "
"settings to allow anyone with access to the link to also add "
"photos to that shared album.\n\nThis is the perfect fit for "
"occasions where you want to ask all your friends and relatives who attended the event to add the photos they took to an album. You can then prune them there; plus everyone can view them in a single place.",
"Quick links!",
"Select some photos, choose \"Create link\" from the selection "
"options, and, well, that's it! You'll get a link that you can "
"share, end-to-end encrypted and secure.\n\nYour quick links will "
"appear at the bottom of the share tab so that you can remove them "
"when they're no longer needed, or convert them to regular albums "
"by renaming them if you want them to stick around.\n\nDepending on the feedback, we\'ll iterate on this (automatically prune quick "
"links, directly open the photo if only a single photo is shared, "
"etc). So let us know which direction you wish us to head!",
),
);
items.add(
ChangeLogEntry(
'''Customize photo grid size''',
"You can now change the number of photos that are shown in a row."
"\n\nSince this was a much requested feature we've released it as "
"an option in Settings > General > Advanced; later we'll also try a gesture for easier access.",
'''Filename search''',
"You can search for files by their names now.",
),
);
items.add(
ChangeLogEntry(
'''Better multi-select, and hide''',
"The item selector gets a new, expanded look with clearly marked "
"actions. We'll use this revamped space to show even more actions"
" you can take on selected photos.\n\nAnd we've already added new "
"actions! You can now select multiple items and hide all of them in one go.",
'''Prune empty albums''',
"There is now a button on the albums tab to remove all empty albums in one go. This will help customers with many empty albums clear out their clutter, and will be visible if you have more than 3 empty albums.",
),
);
items.add(
ChangeLogEntry(
'''Per album free up space''',
"There is now an option to free up space within each on device album. This provides both a more granular, and faster, way to save storage your phone.",
'''Clear caches''',
"Under Settings > General > Advanced, you'll now see an option to "
"view and manage how ente uses temporary storage on your device."
"\n\nThe list will show a breakdown of cached files - Attaching a "
"screenshot of this would help if you feel the ente is using more"
" storage than expected.\n\nThere is also an option to clear all "
"these temporarily cached files to free up space on your device.",
),
);
items.add(
ChangeLogEntry(
'''Longer photo descriptions''',
"The previous 280 character limit on photo captions and descriptions has been increased to 5000.",
'''Reset ignored files''',
"We've added help text to clarify when a file in an on-device album "
"is ignored for backups because it was deleted from ente earlier,"
" and an option to reset this state.\n\nWe've also fixed a bug "
"where an on-device album would get unmarked from backups after using the free up space option within it.",
isFeature: false,
),
);

View file

@ -1,5 +1,3 @@
import 'dart:io';
import 'package:flutter/material.dart';
@ -23,7 +21,6 @@ import 'package:photos/utils/data_util.dart';
import 'package:photos/utils/dialog_util.dart';
import 'package:photos/utils/navigation_util.dart';
import 'package:photos/utils/toast_util.dart';
import 'package:url_launcher/url_launcher_string.dart';
class BackupSectionWidget extends StatefulWidget {
const BackupSectionWidget({Key? key}) : super(key: key);
@ -167,8 +164,7 @@ class BackupSectionWidgetState extends State<BackupSectionWidget> {
body: "You have successfully freed up " + formatBytes(status.size) + "!",
firstButtonLabel: "Rate us",
firstButtonOnTap: () async {
final url = UpdateService.instance.getRateDetails().item2;
launchUrlString(url);
UpdateService.instance.launchReviewUrl();
},
firstButtonType: ButtonType.primary,
secondButtonLabel: "OK",
@ -206,9 +202,7 @@ class BackupSectionWidgetState extends State<BackupSectionWidget> {
"!",
firstButtonLabel: "Rate us",
firstButtonOnTap: () async {
// TODO: Replace with https://pub.dev/packages/in_app_review
final url = UpdateService.instance.getRateDetails().item2;
launchUrlString(url);
UpdateService.instance.launchReviewUrl();
},
firstButtonType: ButtonType.primary,
secondButtonLabel: "OK",

View file

@ -1,5 +1,3 @@
import 'dart:async';
import 'dart:io';
@ -31,7 +29,6 @@ import 'package:photos/utils/dialog_util.dart';
import 'package:photos/utils/magic_util.dart';
import 'package:photos/utils/navigation_util.dart';
import 'package:photos/utils/toast_util.dart';
import 'package:url_launcher/url_launcher_string.dart';
class GalleryAppBarWidget extends StatefulWidget {
final GalleryType type;
@ -206,9 +203,7 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
body: "You have successfully freed up " + formatBytes(status.size) + "!",
firstButtonLabel: "Rate us",
firstButtonOnTap: () async {
// TODO: Replace with https://pub.dev/packages/in_app_review
final url = UpdateService.instance.getRateDetails().item2;
launchUrlString(url);
UpdateService.instance.launchReviewUrl();
},
firstButtonType: ButtonType.primary,
secondButtonLabel: "OK",