Add genID in debug mode

This commit is contained in:
Neeraj Gupta 2023-08-29 19:35:41 +05:30
parent 52009727a1
commit cb1ebac232
5 changed files with 56 additions and 134 deletions

View file

@ -8,38 +8,6 @@ PODS:
- ReachabilitySwift
- device_info (0.0.1):
- Flutter
- Firebase/CoreOnly (10.9.0):
- FirebaseCore (= 10.9.0)
- Firebase/Messaging (10.9.0):
- Firebase/CoreOnly
- FirebaseMessaging (~> 10.9.0)
- firebase_core (2.13.1):
- Firebase/CoreOnly (= 10.9.0)
- Flutter
- firebase_messaging (14.6.2):
- Firebase/Messaging (= 10.9.0)
- firebase_core
- Flutter
- FirebaseCore (10.9.0):
- FirebaseCoreInternal (~> 10.0)
- GoogleUtilities/Environment (~> 7.8)
- GoogleUtilities/Logger (~> 7.8)
- FirebaseCoreInternal (10.13.0):
- "GoogleUtilities/NSData+zlib (~> 7.8)"
- FirebaseInstallations (10.13.0):
- FirebaseCore (~> 10.0)
- GoogleUtilities/Environment (~> 7.8)
- GoogleUtilities/UserDefaults (~> 7.8)
- PromisesObjC (~> 2.1)
- FirebaseMessaging (10.9.0):
- FirebaseCore (~> 10.0)
- FirebaseInstallations (~> 10.0)
- GoogleDataTransport (~> 9.2)
- GoogleUtilities/AppDelegateSwizzler (~> 7.8)
- GoogleUtilities/Environment (~> 7.8)
- GoogleUtilities/Reachability (~> 7.8)
- GoogleUtilities/UserDefaults (~> 7.8)
- nanopb (< 2.30910.0, >= 2.30908.0)
- fk_user_agent (2.0.0):
- Flutter
- Flutter (1.0.0)
@ -71,32 +39,8 @@ PODS:
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
- GoogleDataTransport (9.2.5):
- GoogleUtilities/Environment (~> 7.7)
- nanopb (< 2.30910.0, >= 2.30908.0)
- PromisesObjC (< 3.0, >= 1.2)
- GoogleUtilities/AppDelegateSwizzler (7.11.5):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Environment (7.11.5):
- PromisesObjC (< 3.0, >= 1.2)
- GoogleUtilities/Logger (7.11.5):
- GoogleUtilities/Environment
- GoogleUtilities/Network (7.11.5):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (7.11.5)"
- GoogleUtilities/Reachability (7.11.5):
- GoogleUtilities/Logger
- GoogleUtilities/UserDefaults (7.11.5):
- GoogleUtilities/Logger
- image_editor_common (1.0.0):
- Flutter
- in_app_purchase_storekit (0.0.1):
- Flutter
- FlutterMacOS
- integration_test (0.0.1):
- Flutter
- libwebp (1.3.1):
@ -122,11 +66,6 @@ PODS:
- Flutter
- move_to_background (0.0.1):
- Flutter
- nanopb (2.30909.0):
- nanopb/decode (= 2.30909.0)
- nanopb/encode (= 2.30909.0)
- nanopb/decode (2.30909.0)
- nanopb/encode (2.30909.0)
- open_mail_app (0.0.1):
- Flutter
- OrderedSet (5.0.0)
@ -138,7 +77,6 @@ PODS:
- photo_manager (2.0.0):
- Flutter
- FlutterMacOS
- PromisesObjC (2.3.1)
- ReachabilitySwift (5.0.0)
- receive_sharing_intent (0.0.1):
- Flutter
@ -185,8 +123,6 @@ DEPENDENCIES:
- camera_avfoundation (from `.symlinks/plugins/camera_avfoundation/ios`)
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
- device_info (from `.symlinks/plugins/device_info/ios`)
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
- firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`)
- fk_user_agent (from `.symlinks/plugins/fk_user_agent/ios`)
- Flutter (from `Flutter`)
- flutter_email_sender (from `.symlinks/plugins/flutter_email_sender/ios`)
@ -198,7 +134,6 @@ DEPENDENCIES:
- flutter_sodium (from `.symlinks/plugins/flutter_sodium/ios`)
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
- image_editor_common (from `.symlinks/plugins/image_editor_common/ios`)
- in_app_purchase_storekit (from `.symlinks/plugins/in_app_purchase_storekit/darwin`)
- integration_test (from `.symlinks/plugins/integration_test/ios`)
- local_auth_ios (from `.symlinks/plugins/local_auth_ios/ios`)
- media_extension (from `.symlinks/plugins/media_extension/ios`)
@ -223,19 +158,10 @@ DEPENDENCIES:
SPEC REPOS:
trunk:
- Firebase
- FirebaseCore
- FirebaseCoreInternal
- FirebaseInstallations
- FirebaseMessaging
- FMDB
- GoogleDataTransport
- GoogleUtilities
- libwebp
- Mantle
- nanopb
- OrderedSet
- PromisesObjC
- ReachabilitySwift
- SDWebImage
- SDWebImageWebPCoder
@ -252,10 +178,6 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/connectivity_plus/ios"
device_info:
:path: ".symlinks/plugins/device_info/ios"
firebase_core:
:path: ".symlinks/plugins/firebase_core/ios"
firebase_messaging:
:path: ".symlinks/plugins/firebase_messaging/ios"
fk_user_agent:
:path: ".symlinks/plugins/fk_user_agent/ios"
Flutter:
@ -278,8 +200,6 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/fluttertoast/ios"
image_editor_common:
:path: ".symlinks/plugins/image_editor_common/ios"
in_app_purchase_storekit:
:path: ".symlinks/plugins/in_app_purchase_storekit/darwin"
integration_test:
:path: ".symlinks/plugins/integration_test/ios"
local_auth_ios:
@ -328,13 +248,6 @@ SPEC CHECKSUMS:
camera_avfoundation: 3125e8cd1a4387f6f31c6c63abb8a55892a9eeeb
connectivity_plus: 53efb943fc2882c8512d84c45707bcabc4c36076
device_info: d7d233b645a32c40dfdc212de5cf646ca482f175
Firebase: bd152f0f3d278c4060c5c71359db08ebcfd5a3e2
firebase_core: ce64b0941c6d87c6ef5022ae9116a158236c8c94
firebase_messaging: 42912365e62efc1ea3e00724e5eecba6068ddb88
FirebaseCore: b68d3616526ec02e4d155166bbafb8eca64af557
FirebaseCoreInternal: b342e37cd4f5b4454ec34308f073420e7920858e
FirebaseInstallations: b28af1b9f997f1a799efe818c94695a3728c352f
FirebaseMessaging: 6b7052cc3da7bc8e5f72bef871243e8f04a14eed
fk_user_agent: 1f47ec39291e8372b1d692b50084b0d54103c545
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_email_sender: 02d7443217d8c41483223627972bfdc09f74276b
@ -346,10 +259,7 @@ SPEC CHECKSUMS:
flutter_sodium: c84426b4de738514b5b66cfdeb8a06634e72fe0b
fluttertoast: fafc4fa4d01a6a9e4f772ecd190ffa525e9e2d9c
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
GoogleDataTransport: 54dee9d48d14580407f8f5fbf2f496e92437a2f2
GoogleUtilities: 13e2c67ede716b8741c7989e26893d151b2b2084
image_editor_common: d6f6644ae4a6de80481e89fe6d0a8c49e30b4b43
in_app_purchase_storekit: 4fb7ee9e824b1f09107fbfbbce8c4b276366dc43
integration_test: 13825b8a9334a850581300559b8839134b124670
libwebp: 33dc822fbbf4503668d09f7885bbfedc76c45e96
local_auth_ios: c6cf091ded637a88f24f86a8875d8b0f526e2605
@ -357,13 +267,11 @@ SPEC CHECKSUMS:
media_extension: 6d30dc1431ebaa63f43c397c37917b1a0a597a4c
motionphoto: d4a432b8c8f22fb3ad966258597c0103c9c5ff16
move_to_background: 39a5b79b26d577b0372cbe8a8c55e7aa9fcd3a2d
nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431
open_mail_app: 794172f6a22cd16319d3ddaf45e945b2f74952b0
OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c
package_info_plus: fd030dabf36271f146f1f3beacd48f564b0f17f7
path_provider_foundation: eaf5b3e458fc0e5fbb9940fb09980e853fe058b8
photo_manager: 4f6810b7dfc4feb03b461ac1a70dacf91fba7604
PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
receive_sharing_intent: c0d87310754e74c0f9542947e7cbdf3a0335a3b1
SDWebImage: 750adf017a315a280c60fde706ab1e552a3ae4e9

View file

@ -260,15 +260,8 @@
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework",
"${BUILT_PRODUCTS_DIR}/FirebaseCore/FirebaseCore.framework",
"${BUILT_PRODUCTS_DIR}/FirebaseCoreInternal/FirebaseCoreInternal.framework",
"${BUILT_PRODUCTS_DIR}/FirebaseInstallations/FirebaseInstallations.framework",
"${BUILT_PRODUCTS_DIR}/FirebaseMessaging/FirebaseMessaging.framework",
"${BUILT_PRODUCTS_DIR}/GoogleDataTransport/GoogleDataTransport.framework",
"${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework",
"${BUILT_PRODUCTS_DIR}/Mantle/Mantle.framework",
"${BUILT_PRODUCTS_DIR}/OrderedSet/OrderedSet.framework",
"${BUILT_PRODUCTS_DIR}/PromisesObjC/FBLPromises.framework",
"${BUILT_PRODUCTS_DIR}/ReachabilitySwift/Reachability.framework",
"${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework",
"${BUILT_PRODUCTS_DIR}/SDWebImageWebPCoder/SDWebImageWebPCoder.framework",
@ -289,14 +282,12 @@
"${BUILT_PRODUCTS_DIR}/flutter_sodium/flutter_sodium.framework",
"${BUILT_PRODUCTS_DIR}/fluttertoast/fluttertoast.framework",
"${BUILT_PRODUCTS_DIR}/image_editor_common/image_editor_common.framework",
"${BUILT_PRODUCTS_DIR}/in_app_purchase_storekit/in_app_purchase_storekit.framework",
"${BUILT_PRODUCTS_DIR}/integration_test/integration_test.framework",
"${BUILT_PRODUCTS_DIR}/libwebp/libwebp.framework",
"${BUILT_PRODUCTS_DIR}/local_auth_ios/local_auth_ios.framework",
"${BUILT_PRODUCTS_DIR}/media_extension/media_extension.framework",
"${BUILT_PRODUCTS_DIR}/motionphoto/motionphoto.framework",
"${BUILT_PRODUCTS_DIR}/move_to_background/move_to_background.framework",
"${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework",
"${BUILT_PRODUCTS_DIR}/open_mail_app/open_mail_app.framework",
"${BUILT_PRODUCTS_DIR}/package_info_plus/package_info_plus.framework",
"${BUILT_PRODUCTS_DIR}/path_provider_foundation/path_provider_foundation.framework",
@ -317,15 +308,8 @@
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FMDB.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCore.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCoreInternal.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseInstallations.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseMessaging.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleDataTransport.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Mantle.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OrderedSet.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBLPromises.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Reachability.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImageWebPCoder.framework",
@ -346,14 +330,12 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_sodium.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/fluttertoast.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/image_editor_common.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/in_app_purchase_storekit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/integration_test.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libwebp.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/local_auth_ios.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/media_extension.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/motionphoto.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/move_to_background.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/open_mail_app.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/package_info_plus.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_foundation.framework",

View file

@ -1,4 +1,5 @@
import 'package:extended_image/extended_image.dart';
import "package:flutter/foundation.dart";
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:logging/logging.dart';
@ -142,7 +143,7 @@ class _DetailPageState extends State<DetailPage> {
ValueListenableBuilder(
builder: (BuildContext context, int selectedIndex, _) {
return FileBottomBar(
_files![_selectedIndexNotifier.value],
_files![selectedIndex],
_onEditFileRequested,
widget.config.mode == DetailPageMode.minimalistic,
onFileRemoved: _onFileRemoved,
@ -165,33 +166,46 @@ class _DetailPageState extends State<DetailPage> {
itemBuilder: (context, index) {
final file = _files![index];
_preloadFiles(index);
final Widget fileContent = FileWidget(
file,
autoPlay: shouldAutoPlay(),
tagPrefix: widget.config.tagPrefix,
shouldDisableScroll: (value) {
if (_shouldDisableScroll != value) {
setState(() {
_shouldDisableScroll = value;
});
}
},
//Noticed that when the video is seeked, the video pops and moves the
//seek bar along with it and it happens when bottomPadding is 0. So we
//don't toggle full screen for cases where this issue happens.
playbackCallback: bottomPadding != 0
? (isPlaying) {
Future.delayed(Duration.zero, () {
_toggleFullScreen();
});
}
: null,
backgroundDecoration: const BoxDecoration(color: Colors.black),
);
return GestureDetector(
onTap: () {
_toggleFullScreen();
},
child: FileWidget(
file,
autoPlay: shouldAutoPlay(),
tagPrefix: widget.config.tagPrefix,
shouldDisableScroll: (value) {
if (_shouldDisableScroll != value) {
setState(() {
_shouldDisableScroll = value;
});
}
},
//Noticed that when the video is seeked, the video pops and moves the
//seek bar along with it and it happens when bottomPadding is 0. So we
//don't toggle full screen for cases where this issue happens.
playbackCallback: bottomPadding != 0
? (isPlaying) {
Future.delayed(Duration.zero, () {
_toggleFullScreen();
});
}
: null,
backgroundDecoration: const BoxDecoration(color: Colors.black),
),
child: kDebugMode ?
Stack(children: [
fileContent,
Positioned(
top: 80,
right: 80,
child: Text(
file.generatedID?.toString() ?? 'null',
style: const TextStyle(color: Colors.white),
),
),
],)
: fileContent,
);
},
onPageChanged: (index) {

View file

@ -1,6 +1,7 @@
import 'dart:io';
import 'package:flutter/cupertino.dart';
import "package:flutter/foundation.dart";
import 'package:flutter/material.dart';
import 'package:logging/logging.dart';
import 'package:media_extension/media_extension.dart';
@ -102,6 +103,14 @@ class FileAppBarState extends State<FileAppBar> {
?.isHidden() ??
false;
}
if (kDebugMode) {
actions.add(
Text(
widget.file.generatedID?.toString() ?? 'null',
style: TextStyle(color: Colors.white),
),
);
}
if (widget.file.isLiveOrMotionPhoto) {
actions.add(
IconButton(

View file

@ -1,6 +1,7 @@
import 'dart:io';
import 'package:flutter/cupertino.dart';
import "package:flutter/foundation.dart";
import 'package:flutter/material.dart';
import "package:photos/generated/l10n.dart";
import 'package:photos/models/file/file.dart';
@ -54,6 +55,14 @@ class FileBottomBarState extends State<FileBottomBar> {
final List<Widget> children = [];
final bool isOwnedByUser =
widget.file.ownerID == null || widget.file.ownerID == widget.userID;
if (kDebugMode) {
children.add(
Text(
widget.file.generatedID?.toString() ?? 'null',
style: TextStyle(color: Colors.white),
),
);
}
children.add(
Tooltip(
message: "Info",