[mob] Allow manual upload of videos when global video upload is disabled (#1384)

## Description
See commit message.

PS: Did not write code to clean up the list as I don't expect the list
to grow significantly.

## Tests
* Disabled Global Video Upload

**Before the change**
- Clicking on upload icon on video was not resulting in the upload of
the underlying video.

**After the change**
- Upload upload went through successfully
This commit is contained in:
Neeraj Gupta 2024-04-09 09:42:21 +05:30 committed by GitHub
commit 7c82b57ca0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 242 additions and 213 deletions

View file

@ -460,4 +460,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: c1a8f198a245ed1f10e40b617efdb129b021b225 PODFILE CHECKSUM: c1a8f198a245ed1f10e40b617efdb129b021b225
COCOAPODS: 1.15.2 COCOAPODS: 1.14.3

View file

@ -85,7 +85,7 @@ class MessageLookup extends MessageLookupByLibrary {
static String m20(newEmail) => "Email changed to ${newEmail}"; static String m20(newEmail) => "Email changed to ${newEmail}";
static String m21(email) => static String m21(email) =>
"${email} does not have an ente account.\n\nSend them an invite to share photos."; "${email} does not have an Ente account.\n\nSend them an invite to share photos.";
static String m22(count, formattedNumber) => static String m22(count, formattedNumber) =>
"${Intl.plural(count, one: '1 file', other: '${formattedNumber} files')} on this device have been backed up safely"; "${Intl.plural(count, one: '1 file', other: '${formattedNumber} files')} on this device have been backed up safely";
@ -102,7 +102,7 @@ class MessageLookup extends MessageLookupByLibrary {
static String m26(endDate) => "Free trial valid till ${endDate}"; static String m26(endDate) => "Free trial valid till ${endDate}";
static String m27(count) => static String m27(count) =>
"You can still access ${Intl.plural(count, one: 'it', other: 'them')} on ente as long as you have an active subscription"; "You can still access ${Intl.plural(count, one: 'it', other: 'them')} on Ente as long as you have an active subscription";
static String m28(sizeInMBorGB) => "Free up ${sizeInMBorGB}"; static String m28(sizeInMBorGB) => "Free up ${sizeInMBorGB}";
@ -163,7 +163,7 @@ class MessageLookup extends MessageLookupByLibrary {
"Hey, can you confirm that this is your ente.io verification ID: ${verificationID}"; "Hey, can you confirm that this is your ente.io verification ID: ${verificationID}";
static String m50(referralCode, referralStorageInGB) => static String m50(referralCode, referralStorageInGB) =>
"ente referral code: ${referralCode} \n\nApply it in Settings → General → Referrals to get ${referralStorageInGB} GB free after you signup for a paid plan\n\nhttps://ente.io"; "Ente referral code: ${referralCode} \n\nApply it in Settings → General → Referrals to get ${referralStorageInGB} GB free after you signup for a paid plan\n\nhttps://ente.io";
static String m51(numberOfPeople) => static String m51(numberOfPeople) =>
"${Intl.plural(numberOfPeople, zero: 'Share with specific people', one: 'Shared with 1 person', other: 'Shared with ${numberOfPeople} people')}"; "${Intl.plural(numberOfPeople, zero: 'Share with specific people', one: 'Shared with 1 person', other: 'Shared with ${numberOfPeople} people')}";
@ -174,9 +174,9 @@ class MessageLookup extends MessageLookupByLibrary {
"This ${fileType} will be deleted from your device."; "This ${fileType} will be deleted from your device.";
static String m54(fileType) => static String m54(fileType) =>
"This ${fileType} is in both ente and your device."; "This ${fileType} is in both Ente and your device.";
static String m55(fileType) => "This ${fileType} will be deleted from ente."; static String m55(fileType) => "This ${fileType} will be deleted from Ente.";
static String m56(storageAmountInGB) => "${storageAmountInGB} GB"; static String m56(storageAmountInGB) => "${storageAmountInGB} GB";
@ -185,7 +185,7 @@ class MessageLookup extends MessageLookupByLibrary {
"${usedAmount} ${usedStorageUnit} of ${totalAmount} ${totalStorageUnit} used"; "${usedAmount} ${usedStorageUnit} of ${totalAmount} ${totalStorageUnit} used";
static String m58(id) => static String m58(id) =>
"Your ${id} is already linked to another ente account.\nIf you would like to use your ${id} with this account, please contact our support\'\'"; "Your ${id} is already linked to another Ente account.\nIf you would like to use your ${id} with this account, please contact our support\'\'";
static String m59(endDate) => static String m59(endDate) =>
"Your subscription will be cancelled on ${endDate}"; "Your subscription will be cancelled on ${endDate}";
@ -216,7 +216,7 @@ class MessageLookup extends MessageLookupByLibrary {
final messages = _notInlinedMessages(_notInlinedMessages); final messages = _notInlinedMessages(_notInlinedMessages);
static Map<String, Function> _notInlinedMessages(_) => <String, Function>{ static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
"aNewVersionOfEnteIsAvailable": MessageLookupByLibrary.simpleMessage( "aNewVersionOfEnteIsAvailable": MessageLookupByLibrary.simpleMessage(
"A new version of ente is available."), "A new version of Ente is available."),
"about": MessageLookupByLibrary.simpleMessage("About"), "about": MessageLookupByLibrary.simpleMessage("About"),
"account": MessageLookupByLibrary.simpleMessage("Account"), "account": MessageLookupByLibrary.simpleMessage("Account"),
"accountWelcomeBack": "accountWelcomeBack":
@ -243,7 +243,7 @@ class MessageLookup extends MessageLookupByLibrary {
"addPhotos": MessageLookupByLibrary.simpleMessage("Add photos"), "addPhotos": MessageLookupByLibrary.simpleMessage("Add photos"),
"addSelected": MessageLookupByLibrary.simpleMessage("Add selected"), "addSelected": MessageLookupByLibrary.simpleMessage("Add selected"),
"addToAlbum": MessageLookupByLibrary.simpleMessage("Add to album"), "addToAlbum": MessageLookupByLibrary.simpleMessage("Add to album"),
"addToEnte": MessageLookupByLibrary.simpleMessage("Add to ente"), "addToEnte": MessageLookupByLibrary.simpleMessage("Add to Ente"),
"addToHiddenAlbum": "addToHiddenAlbum":
MessageLookupByLibrary.simpleMessage("Add to hidden album"), MessageLookupByLibrary.simpleMessage("Add to hidden album"),
"addViewer": MessageLookupByLibrary.simpleMessage("Add viewer"), "addViewer": MessageLookupByLibrary.simpleMessage("Add viewer"),
@ -430,7 +430,7 @@ class MessageLookup extends MessageLookupByLibrary {
"codeUsedByYou": "codeUsedByYou":
MessageLookupByLibrary.simpleMessage("Code used by you"), MessageLookupByLibrary.simpleMessage("Code used by you"),
"collabLinkSectionDescription": MessageLookupByLibrary.simpleMessage( "collabLinkSectionDescription": MessageLookupByLibrary.simpleMessage(
"Create a link to allow people to add and view photos in your shared album without needing an ente app or account. Great for collecting event photos."), "Create a link to allow people to add and view photos in your shared album without needing an Ente app or account. Great for collecting event photos."),
"collaborativeLink": "collaborativeLink":
MessageLookupByLibrary.simpleMessage("Collaborative link"), MessageLookupByLibrary.simpleMessage("Collaborative link"),
"collaborativeLinkCreatedFor": m11, "collaborativeLinkCreatedFor": m11,
@ -528,7 +528,7 @@ class MessageLookup extends MessageLookupByLibrary {
"This will delete all empty albums. This is useful when you want to reduce the clutter in your album list."), "This will delete all empty albums. This is useful when you want to reduce the clutter in your album list."),
"deleteAll": MessageLookupByLibrary.simpleMessage("Delete All"), "deleteAll": MessageLookupByLibrary.simpleMessage("Delete All"),
"deleteConfirmDialogBody": MessageLookupByLibrary.simpleMessage( "deleteConfirmDialogBody": MessageLookupByLibrary.simpleMessage(
"This account is linked to other ente apps, if you use any. Your uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted."), "This account is linked to other Ente apps, if you use any. Your uploaded data, across all Ente apps, will be scheduled for deletion, and your account will be permanently deleted."),
"deleteEmailRequest": MessageLookupByLibrary.simpleMessage( "deleteEmailRequest": MessageLookupByLibrary.simpleMessage(
"Please send an email to <warning>account-deletion@ente.io</warning> from your registered email address."), "Please send an email to <warning>account-deletion@ente.io</warning> from your registered email address."),
"deleteEmptyAlbums": "deleteEmptyAlbums":
@ -540,7 +540,7 @@ class MessageLookup extends MessageLookupByLibrary {
"deleteFromDevice": "deleteFromDevice":
MessageLookupByLibrary.simpleMessage("Delete from device"), MessageLookupByLibrary.simpleMessage("Delete from device"),
"deleteFromEnte": "deleteFromEnte":
MessageLookupByLibrary.simpleMessage("Delete from ente"), MessageLookupByLibrary.simpleMessage("Delete from Ente"),
"deleteItemCount": m14, "deleteItemCount": m14,
"deleteLocation": "deleteLocation":
MessageLookupByLibrary.simpleMessage("Delete location"), MessageLookupByLibrary.simpleMessage("Delete location"),
@ -566,7 +566,7 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage("Designed to outlive"), MessageLookupByLibrary.simpleMessage("Designed to outlive"),
"details": MessageLookupByLibrary.simpleMessage("Details"), "details": MessageLookupByLibrary.simpleMessage("Details"),
"devAccountChanged": MessageLookupByLibrary.simpleMessage( "devAccountChanged": MessageLookupByLibrary.simpleMessage(
"The developer account we use to publish ente on App Store has changed. Because of this, you will need to login again.\n\nOur apologies for the inconvenience, but this was unavoidable."), "The developer account we use to publish Ente on App Store has changed. Because of this, you will need to login again.\n\nOur apologies for the inconvenience, but this was unavoidable."),
"developerSettings": "developerSettings":
MessageLookupByLibrary.simpleMessage("Developer settings"), MessageLookupByLibrary.simpleMessage("Developer settings"),
"developerSettingsWarning": MessageLookupByLibrary.simpleMessage( "developerSettingsWarning": MessageLookupByLibrary.simpleMessage(
@ -574,9 +574,9 @@ class MessageLookup extends MessageLookupByLibrary {
"deviceCodeHint": "deviceCodeHint":
MessageLookupByLibrary.simpleMessage("Enter the code"), MessageLookupByLibrary.simpleMessage("Enter the code"),
"deviceFilesAutoUploading": MessageLookupByLibrary.simpleMessage( "deviceFilesAutoUploading": MessageLookupByLibrary.simpleMessage(
"Files added to this device album will automatically get uploaded to ente."), "Files added to this device album will automatically get uploaded to Ente."),
"deviceLockExplanation": MessageLookupByLibrary.simpleMessage( "deviceLockExplanation": MessageLookupByLibrary.simpleMessage(
"Disable the device screen lock when ente is in the foreground and there is a backup in progress. This is normally not needed, but may help big uploads and initial imports of large libraries complete faster."), "Disable the device screen lock when Ente is in the foreground and there is a backup in progress. This is normally not needed, but may help big uploads and initial imports of large libraries complete faster."),
"deviceNotFound": "deviceNotFound":
MessageLookupByLibrary.simpleMessage("Device not found"), MessageLookupByLibrary.simpleMessage("Device not found"),
"didYouKnow": MessageLookupByLibrary.simpleMessage("Did you know?"), "didYouKnow": MessageLookupByLibrary.simpleMessage("Did you know?"),
@ -642,11 +642,11 @@ class MessageLookup extends MessageLookupByLibrary {
"End-to-end encrypted by default"), "End-to-end encrypted by default"),
"enteCanEncryptAndPreserveFilesOnlyIfYouGrant": "enteCanEncryptAndPreserveFilesOnlyIfYouGrant":
MessageLookupByLibrary.simpleMessage( MessageLookupByLibrary.simpleMessage(
"ente can encrypt and preserve files only if you grant access to them"), "Ente can encrypt and preserve files only if you grant access to them"),
"entePhotosPerm": MessageLookupByLibrary.simpleMessage( "entePhotosPerm": MessageLookupByLibrary.simpleMessage(
"ente <i>needs permission to</i> preserve your photos"), "Ente <i>needs permission to</i> preserve your photos"),
"enteSubscriptionPitch": MessageLookupByLibrary.simpleMessage( "enteSubscriptionPitch": MessageLookupByLibrary.simpleMessage(
"ente preserves your memories, so they\'re always available to you, even if you lose your device."), "Ente preserves your memories, so they\'re always available to you, even if you lose your device."),
"enteSubscriptionShareWithFamily": MessageLookupByLibrary.simpleMessage( "enteSubscriptionShareWithFamily": MessageLookupByLibrary.simpleMessage(
"Your family can be added to your plan as well."), "Your family can be added to your plan as well."),
"enterAlbumName": "enterAlbumName":
@ -702,7 +702,7 @@ class MessageLookup extends MessageLookupByLibrary {
"failedToVerifyPaymentStatus": MessageLookupByLibrary.simpleMessage( "failedToVerifyPaymentStatus": MessageLookupByLibrary.simpleMessage(
"Failed to verify payment status"), "Failed to verify payment status"),
"familyPlanOverview": MessageLookupByLibrary.simpleMessage( "familyPlanOverview": MessageLookupByLibrary.simpleMessage(
"Add 5 family members to your existing plan without paying extra.\n\nEach member gets their own private space, and cannot see each other\'s files unless they\'re shared.\n\nFamily plans are available to customers who have a paid ente subscription.\n\nSubscribe now to get started!"), "Add 5 family members to your existing plan without paying extra.\n\nEach member gets their own private space, and cannot see each other\'s files unless they\'re shared.\n\nFamily plans are available to customers who have a paid Ente subscription.\n\nSubscribe now to get started!"),
"familyPlanPortalTitle": MessageLookupByLibrary.simpleMessage("Family"), "familyPlanPortalTitle": MessageLookupByLibrary.simpleMessage("Family"),
"familyPlans": MessageLookupByLibrary.simpleMessage("Family plans"), "familyPlans": MessageLookupByLibrary.simpleMessage("Family plans"),
"faq": MessageLookupByLibrary.simpleMessage("FAQ"), "faq": MessageLookupByLibrary.simpleMessage("FAQ"),
@ -774,7 +774,7 @@ class MessageLookup extends MessageLookupByLibrary {
"iOSOkButton": MessageLookupByLibrary.simpleMessage("OK"), "iOSOkButton": MessageLookupByLibrary.simpleMessage("OK"),
"ignoreUpdate": MessageLookupByLibrary.simpleMessage("Ignore"), "ignoreUpdate": MessageLookupByLibrary.simpleMessage("Ignore"),
"ignoredFolderUploadReason": MessageLookupByLibrary.simpleMessage( "ignoredFolderUploadReason": MessageLookupByLibrary.simpleMessage(
"Some files in this album are ignored from upload because they had previously been deleted from ente."), "Some files in this album are ignored from upload because they had previously been deleted from Ente."),
"importing": MessageLookupByLibrary.simpleMessage("Importing...."), "importing": MessageLookupByLibrary.simpleMessage("Importing...."),
"incorrectCode": MessageLookupByLibrary.simpleMessage("Incorrect code"), "incorrectCode": MessageLookupByLibrary.simpleMessage("Incorrect code"),
"incorrectPasswordTitle": "incorrectPasswordTitle":
@ -800,11 +800,11 @@ class MessageLookup extends MessageLookupByLibrary {
"invalidRecoveryKey": MessageLookupByLibrary.simpleMessage( "invalidRecoveryKey": MessageLookupByLibrary.simpleMessage(
"The recovery key you entered is not valid. Please make sure it contains 24 words, and check the spelling of each.\n\nIf you entered an older recovery code, make sure it is 64 characters long, and check each of them."), "The recovery key you entered is not valid. Please make sure it contains 24 words, and check the spelling of each.\n\nIf you entered an older recovery code, make sure it is 64 characters long, and check each of them."),
"invite": MessageLookupByLibrary.simpleMessage("Invite"), "invite": MessageLookupByLibrary.simpleMessage("Invite"),
"inviteToEnte": MessageLookupByLibrary.simpleMessage("Invite to ente"), "inviteToEnte": MessageLookupByLibrary.simpleMessage("Invite to Ente"),
"inviteYourFriends": "inviteYourFriends":
MessageLookupByLibrary.simpleMessage("Invite your friends"), MessageLookupByLibrary.simpleMessage("Invite your friends"),
"inviteYourFriendsToEnte": "inviteYourFriendsToEnte":
MessageLookupByLibrary.simpleMessage("Invite your friends to ente"), MessageLookupByLibrary.simpleMessage("Invite your friends to Ente"),
"itLooksLikeSomethingWentWrongPleaseRetryAfterSome": "itLooksLikeSomethingWentWrongPleaseRetryAfterSome":
MessageLookupByLibrary.simpleMessage( MessageLookupByLibrary.simpleMessage(
"It looks like something went wrong. Please retry after some time. If the error persists, please contact our support team."), "It looks like something went wrong. Please retry after some time. If the error persists, please contact our support team."),
@ -931,7 +931,7 @@ class MessageLookup extends MessageLookupByLibrary {
"Unable to connect to Ente, please check your network settings and contact support if the error persists."), "Unable to connect to Ente, please check your network settings and contact support if the error persists."),
"never": MessageLookupByLibrary.simpleMessage("Never"), "never": MessageLookupByLibrary.simpleMessage("Never"),
"newAlbum": MessageLookupByLibrary.simpleMessage("New album"), "newAlbum": MessageLookupByLibrary.simpleMessage("New album"),
"newToEnte": MessageLookupByLibrary.simpleMessage("New to ente"), "newToEnte": MessageLookupByLibrary.simpleMessage("New to Ente"),
"newest": MessageLookupByLibrary.simpleMessage("Newest"), "newest": MessageLookupByLibrary.simpleMessage("Newest"),
"no": MessageLookupByLibrary.simpleMessage("No"), "no": MessageLookupByLibrary.simpleMessage("No"),
"noAlbumsSharedByYouYet": "noAlbumsSharedByYouYet":
@ -1222,7 +1222,7 @@ class MessageLookup extends MessageLookupByLibrary {
"selectYourPlan": "selectYourPlan":
MessageLookupByLibrary.simpleMessage("Select your plan"), MessageLookupByLibrary.simpleMessage("Select your plan"),
"selectedFilesAreNotOnEnte": MessageLookupByLibrary.simpleMessage( "selectedFilesAreNotOnEnte": MessageLookupByLibrary.simpleMessage(
"Selected files are not on ente"), "Selected files are not on Ente"),
"selectedFoldersWillBeEncryptedAndBackedUp": "selectedFoldersWillBeEncryptedAndBackedUp":
MessageLookupByLibrary.simpleMessage( MessageLookupByLibrary.simpleMessage(
"Selected folders will be encrypted and backed up"), "Selected folders will be encrypted and backed up"),
@ -1259,15 +1259,15 @@ class MessageLookup extends MessageLookupByLibrary {
"Share only with the people you want"), "Share only with the people you want"),
"shareTextConfirmOthersVerificationID": m49, "shareTextConfirmOthersVerificationID": m49,
"shareTextRecommendUsingEnte": MessageLookupByLibrary.simpleMessage( "shareTextRecommendUsingEnte": MessageLookupByLibrary.simpleMessage(
"Download ente so we can easily share original quality photos and videos\n\nhttps://ente.io"), "Download Ente so we can easily share original quality photos and videos\n\nhttps://ente.io"),
"shareTextReferralCode": m50, "shareTextReferralCode": m50,
"shareWithNonenteUsers": "shareWithNonenteUsers":
MessageLookupByLibrary.simpleMessage("Share with non-ente users"), MessageLookupByLibrary.simpleMessage("Share with non-Ente users"),
"shareWithPeopleSectionTitle": m51, "shareWithPeopleSectionTitle": m51,
"shareYourFirstAlbum": "shareYourFirstAlbum":
MessageLookupByLibrary.simpleMessage("Share your first album"), MessageLookupByLibrary.simpleMessage("Share your first album"),
"sharedAlbumSectionDescription": MessageLookupByLibrary.simpleMessage( "sharedAlbumSectionDescription": MessageLookupByLibrary.simpleMessage(
"Create shared and collaborative albums with other ente users, including users on free plans."), "Create shared and collaborative albums with other Ente users, including users on free plans."),
"sharedByMe": MessageLookupByLibrary.simpleMessage("Shared by me"), "sharedByMe": MessageLookupByLibrary.simpleMessage("Shared by me"),
"sharedByYou": MessageLookupByLibrary.simpleMessage("Shared by you"), "sharedByYou": MessageLookupByLibrary.simpleMessage("Shared by you"),
"sharedPhotoNotifications": "sharedPhotoNotifications":
@ -1297,7 +1297,7 @@ class MessageLookup extends MessageLookupByLibrary {
"social": MessageLookupByLibrary.simpleMessage("Social"), "social": MessageLookupByLibrary.simpleMessage("Social"),
"someItemsAreInBothEnteAndYourDevice": "someItemsAreInBothEnteAndYourDevice":
MessageLookupByLibrary.simpleMessage( MessageLookupByLibrary.simpleMessage(
"Some items are in both ente and your device."), "Some items are in both Ente and your device."),
"someOfTheFilesYouAreTryingToDeleteAre": "someOfTheFilesYouAreTryingToDeleteAre":
MessageLookupByLibrary.simpleMessage( MessageLookupByLibrary.simpleMessage(
"Some of the files you are trying to delete are only available on your device and cannot be recovered if deleted"), "Some of the files you are trying to delete are only available on your device and cannot be recovered if deleted"),
@ -1414,7 +1414,7 @@ class MessageLookup extends MessageLookupByLibrary {
"trashDaysLeft": m63, "trashDaysLeft": m63,
"tryAgain": MessageLookupByLibrary.simpleMessage("Try again"), "tryAgain": MessageLookupByLibrary.simpleMessage("Try again"),
"turnOnBackupForAutoUpload": MessageLookupByLibrary.simpleMessage( "turnOnBackupForAutoUpload": MessageLookupByLibrary.simpleMessage(
"Turn on backup to automatically upload files added to this device folder to ente."), "Turn on backup to automatically upload files added to this device folder to Ente."),
"twitter": MessageLookupByLibrary.simpleMessage("Twitter"), "twitter": MessageLookupByLibrary.simpleMessage("Twitter"),
"twoMonthsFreeOnYearlyPlans": MessageLookupByLibrary.simpleMessage( "twoMonthsFreeOnYearlyPlans": MessageLookupByLibrary.simpleMessage(
"2 months free on yearly plans"), "2 months free on yearly plans"),
@ -1457,7 +1457,7 @@ class MessageLookup extends MessageLookupByLibrary {
"Usable storage is limited by your current plan. Excess claimed storage will automatically become usable when you upgrade your plan."), "Usable storage is limited by your current plan. Excess claimed storage will automatically become usable when you upgrade your plan."),
"usePublicLinksForPeopleNotOnEnte": "usePublicLinksForPeopleNotOnEnte":
MessageLookupByLibrary.simpleMessage( MessageLookupByLibrary.simpleMessage(
"Use public links for people not on ente"), "Use public links for people not on Ente"),
"useRecoveryKey": "useRecoveryKey":
MessageLookupByLibrary.simpleMessage("Use recovery key"), MessageLookupByLibrary.simpleMessage("Use recovery key"),
"useSelectedPhoto": "useSelectedPhoto":

View file

@ -290,10 +290,10 @@ class S {
); );
} }
/// `ente <i>needs permission to</i> preserve your photos` /// `Ente <i>needs permission to</i> preserve your photos`
String get entePhotosPerm { String get entePhotosPerm {
return Intl.message( return Intl.message(
'ente <i>needs permission to</i> preserve your photos', 'Ente <i>needs permission to</i> preserve your photos',
name: 'entePhotosPerm', name: 'entePhotosPerm',
desc: '', desc: '',
args: [], args: [],
@ -1743,10 +1743,10 @@ class S {
); );
} }
/// `Create a link to allow people to add and view photos in your shared album without needing an ente app or account. Great for collecting event photos.` /// `Create a link to allow people to add and view photos in your shared album without needing an Ente app or account. Great for collecting event photos.`
String get collabLinkSectionDescription { String get collabLinkSectionDescription {
return Intl.message( return Intl.message(
'Create a link to allow people to add and view photos in your shared album without needing an ente app or account. Great for collecting event photos.', 'Create a link to allow people to add and view photos in your shared album without needing an Ente app or account. Great for collecting event photos.',
name: 'collabLinkSectionDescription', name: 'collabLinkSectionDescription',
desc: '', desc: '',
args: [], args: [],
@ -1773,10 +1773,10 @@ class S {
); );
} }
/// `Share with non-ente users` /// `Share with non-Ente users`
String get shareWithNonenteUsers { String get shareWithNonenteUsers {
return Intl.message( return Intl.message(
'Share with non-ente users', 'Share with non-Ente users',
name: 'shareWithNonenteUsers', name: 'shareWithNonenteUsers',
desc: '', desc: '',
args: [], args: [],
@ -1843,10 +1843,10 @@ class S {
); );
} }
/// `Create shared and collaborative albums with other ente users, including users on free plans.` /// `Create shared and collaborative albums with other Ente users, including users on free plans.`
String get sharedAlbumSectionDescription { String get sharedAlbumSectionDescription {
return Intl.message( return Intl.message(
'Create shared and collaborative albums with other ente users, including users on free plans.', 'Create shared and collaborative albums with other Ente users, including users on free plans.',
name: 'sharedAlbumSectionDescription', name: 'sharedAlbumSectionDescription',
desc: '', desc: '',
args: [], args: [],
@ -1926,10 +1926,10 @@ class S {
); );
} }
/// `{email} does not have an ente account.\n\nSend them an invite to share photos.` /// `{email} does not have an Ente account.\n\nSend them an invite to share photos.`
String emailNoEnteAccount(Object email) { String emailNoEnteAccount(Object email) {
return Intl.message( return Intl.message(
'$email does not have an ente account.\n\nSend them an invite to share photos.', '$email does not have an Ente account.\n\nSend them an invite to share photos.',
name: 'emailNoEnteAccount', name: 'emailNoEnteAccount',
desc: '', desc: '',
args: [email], args: [email],
@ -1976,10 +1976,10 @@ class S {
); );
} }
/// `Download ente so we can easily share original quality photos and videos\n\nhttps://ente.io` /// `Download Ente so we can easily share original quality photos and videos\n\nhttps://ente.io`
String get shareTextRecommendUsingEnte { String get shareTextRecommendUsingEnte {
return Intl.message( return Intl.message(
'Download ente so we can easily share original quality photos and videos\n\nhttps://ente.io', 'Download Ente so we can easily share original quality photos and videos\n\nhttps://ente.io',
name: 'shareTextRecommendUsingEnte', name: 'shareTextRecommendUsingEnte',
desc: '', desc: '',
args: [], args: [],
@ -2116,11 +2116,11 @@ class S {
); );
} }
/// `ente referral code: {referralCode} \n\nApply it in Settings General Referrals to get {referralStorageInGB} GB free after you signup for a paid plan\n\nhttps://ente.io` /// `Ente referral code: {referralCode} \n\nApply it in Settings General Referrals to get {referralStorageInGB} GB free after you signup for a paid plan\n\nhttps://ente.io`
String shareTextReferralCode( String shareTextReferralCode(
Object referralCode, Object referralStorageInGB) { Object referralCode, Object referralStorageInGB) {
return Intl.message( return Intl.message(
'ente referral code: $referralCode \n\nApply it in Settings → General → Referrals to get $referralStorageInGB GB free after you signup for a paid plan\n\nhttps://ente.io', 'Ente referral code: $referralCode \n\nApply it in Settings → General → Referrals to get $referralStorageInGB GB free after you signup for a paid plan\n\nhttps://ente.io',
name: 'shareTextReferralCode', name: 'shareTextReferralCode',
desc: '', desc: '',
args: [referralCode, referralStorageInGB], args: [referralCode, referralStorageInGB],
@ -2532,10 +2532,10 @@ class S {
); );
} }
/// `Invite to ente` /// `Invite to Ente`
String get inviteToEnte { String get inviteToEnte {
return Intl.message( return Intl.message(
'Invite to ente', 'Invite to Ente',
name: 'inviteToEnte', name: 'inviteToEnte',
desc: '', desc: '',
args: [], args: [],
@ -2692,20 +2692,20 @@ class S {
); );
} }
/// `This {fileType} is in both ente and your device.` /// `This {fileType} is in both Ente and your device.`
String singleFileInBothLocalAndRemote(Object fileType) { String singleFileInBothLocalAndRemote(Object fileType) {
return Intl.message( return Intl.message(
'This $fileType is in both ente and your device.', 'This $fileType is in both Ente and your device.',
name: 'singleFileInBothLocalAndRemote', name: 'singleFileInBothLocalAndRemote',
desc: '', desc: '',
args: [fileType], args: [fileType],
); );
} }
/// `This {fileType} will be deleted from ente.` /// `This {fileType} will be deleted from Ente.`
String singleFileInRemoteOnly(Object fileType) { String singleFileInRemoteOnly(Object fileType) {
return Intl.message( return Intl.message(
'This $fileType will be deleted from ente.', 'This $fileType will be deleted from Ente.',
name: 'singleFileInRemoteOnly', name: 'singleFileInRemoteOnly',
desc: '', desc: '',
args: [fileType], args: [fileType],
@ -2722,10 +2722,10 @@ class S {
); );
} }
/// `Delete from ente` /// `Delete from Ente`
String get deleteFromEnte { String get deleteFromEnte {
return Intl.message( return Intl.message(
'Delete from ente', 'Delete from Ente',
name: 'deleteFromEnte', name: 'deleteFromEnte',
desc: '', desc: '',
args: [], args: [],
@ -3102,10 +3102,10 @@ class S {
); );
} }
/// `Disable the device screen lock when ente is in the foreground and there is a backup in progress. This is normally not needed, but may help big uploads and initial imports of large libraries complete faster.` /// `Disable the device screen lock when Ente is in the foreground and there is a backup in progress. This is normally not needed, but may help big uploads and initial imports of large libraries complete faster.`
String get deviceLockExplanation { String get deviceLockExplanation {
return Intl.message( return Intl.message(
'Disable the device screen lock when ente is in the foreground and there is a backup in progress. This is normally not needed, but may help big uploads and initial imports of large libraries complete faster.', 'Disable the device screen lock when Ente is in the foreground and there is a backup in progress. This is normally not needed, but may help big uploads and initial imports of large libraries complete faster.',
name: 'deviceLockExplanation', name: 'deviceLockExplanation',
desc: '', desc: '',
args: [], args: [],
@ -3302,10 +3302,10 @@ class S {
); );
} }
/// `A new version of ente is available.` /// `A new version of Ente is available.`
String get aNewVersionOfEnteIsAvailable { String get aNewVersionOfEnteIsAvailable {
return Intl.message( return Intl.message(
'A new version of ente is available.', 'A new version of Ente is available.',
name: 'aNewVersionOfEnteIsAvailable', name: 'aNewVersionOfEnteIsAvailable',
desc: '', desc: '',
args: [], args: [],
@ -3954,10 +3954,10 @@ class S {
); );
} }
/// `ente preserves your memories, so they're always available to you, even if you lose your device.` /// `Ente preserves your memories, so they're always available to you, even if you lose your device.`
String get enteSubscriptionPitch { String get enteSubscriptionPitch {
return Intl.message( return Intl.message(
'ente preserves your memories, so they\'re always available to you, even if you lose your device.', 'Ente preserves your memories, so they\'re always available to you, even if you lose your device.',
name: 'enteSubscriptionPitch', name: 'enteSubscriptionPitch',
desc: '', desc: '',
args: [], args: [],
@ -3979,7 +3979,7 @@ class S {
return Intl.message( return Intl.message(
'Current usage is ', 'Current usage is ',
name: 'currentUsageIs', name: 'currentUsageIs',
desc: 'This text is followed by storage usaged', desc: 'This text is followed by storage usage',
args: [], args: [],
); );
} }
@ -4365,10 +4365,10 @@ class S {
); );
} }
/// `Your {id} is already linked to another ente account.\nIf you would like to use your {id} with this account, please contact our support''` /// `Your {id} is already linked to another Ente account.\nIf you would like to use your {id} with this account, please contact our support''`
String subAlreadyLinkedErrMessage(Object id) { String subAlreadyLinkedErrMessage(Object id) {
return Intl.message( return Intl.message(
'Your $id is already linked to another ente account.\nIf you would like to use your $id with this account, please contact our support\'\'', 'Your $id is already linked to another Ente account.\nIf you would like to use your $id with this account, please contact our support\'\'',
name: 'subAlreadyLinkedErrMessage', name: 'subAlreadyLinkedErrMessage',
desc: '', desc: '',
args: [id], args: [id],
@ -4715,10 +4715,10 @@ class S {
); );
} }
/// `New to ente` /// `New to Ente`
String get newToEnte { String get newToEnte {
return Intl.message( return Intl.message(
'New to ente', 'New to Ente',
name: 'newToEnte', name: 'newToEnte',
desc: '', desc: '',
args: [], args: [],
@ -4735,10 +4735,10 @@ class S {
); );
} }
/// `The developer account we use to publish ente on App Store has changed. Because of this, you will need to login again.\n\nOur apologies for the inconvenience, but this was unavoidable.` /// `The developer account we use to publish Ente on App Store has changed. Because of this, you will need to login again.\n\nOur apologies for the inconvenience, but this was unavoidable.`
String get devAccountChanged { String get devAccountChanged {
return Intl.message( return Intl.message(
'The developer account we use to publish ente on App Store has changed. Because of this, you will need to login again.\n\nOur apologies for the inconvenience, but this was unavoidable.', 'The developer account we use to publish Ente on App Store has changed. Because of this, you will need to login again.\n\nOur apologies for the inconvenience, but this was unavoidable.',
name: 'devAccountChanged', name: 'devAccountChanged',
desc: '', desc: '',
args: [], args: [],
@ -4806,10 +4806,10 @@ class S {
); );
} }
/// `ente can encrypt and preserve files only if you grant access to them` /// `Ente can encrypt and preserve files only if you grant access to them`
String get enteCanEncryptAndPreserveFilesOnlyIfYouGrant { String get enteCanEncryptAndPreserveFilesOnlyIfYouGrant {
return Intl.message( return Intl.message(
'ente can encrypt and preserve files only if you grant access to them', 'Ente can encrypt and preserve files only if you grant access to them',
name: 'enteCanEncryptAndPreserveFilesOnlyIfYouGrant', name: 'enteCanEncryptAndPreserveFilesOnlyIfYouGrant',
desc: '', desc: '',
args: [], args: [],
@ -4856,10 +4856,10 @@ class S {
); );
} }
/// `Use public links for people not on ente` /// `Use public links for people not on Ente`
String get usePublicLinksForPeopleNotOnEnte { String get usePublicLinksForPeopleNotOnEnte {
return Intl.message( return Intl.message(
'Use public links for people not on ente', 'Use public links for people not on Ente',
name: 'usePublicLinksForPeopleNotOnEnte', name: 'usePublicLinksForPeopleNotOnEnte',
desc: '', desc: '',
args: [], args: [],
@ -4931,7 +4931,7 @@ class S {
return Intl.message( return Intl.message(
'On <branding>ente</branding>', 'On <branding>ente</branding>',
name: 'onEnte', name: 'onEnte',
desc: 'The text displayed above albums backed up to ente', desc: 'The text displayed above albums backed up to Ente',
args: [], args: [],
); );
} }
@ -5177,10 +5177,10 @@ class S {
); );
} }
/// `Add to ente` /// `Add to Ente`
String get addToEnte { String get addToEnte {
return Intl.message( return Intl.message(
'Add to ente', 'Add to Ente',
name: 'addToEnte', name: 'addToEnte',
desc: '', desc: '',
args: [], args: [],
@ -5655,10 +5655,10 @@ class S {
); );
} }
/// `Some files in this album are ignored from upload because they had previously been deleted from ente.` /// `Some files in this album are ignored from upload because they had previously been deleted from Ente.`
String get ignoredFolderUploadReason { String get ignoredFolderUploadReason {
return Intl.message( return Intl.message(
'Some files in this album are ignored from upload because they had previously been deleted from ente.', 'Some files in this album are ignored from upload because they had previously been deleted from Ente.',
name: 'ignoredFolderUploadReason', name: 'ignoredFolderUploadReason',
desc: '', desc: '',
args: [], args: [],
@ -5675,20 +5675,20 @@ class S {
); );
} }
/// `Files added to this device album will automatically get uploaded to ente.` /// `Files added to this device album will automatically get uploaded to Ente.`
String get deviceFilesAutoUploading { String get deviceFilesAutoUploading {
return Intl.message( return Intl.message(
'Files added to this device album will automatically get uploaded to ente.', 'Files added to this device album will automatically get uploaded to Ente.',
name: 'deviceFilesAutoUploading', name: 'deviceFilesAutoUploading',
desc: '', desc: '',
args: [], args: [],
); );
} }
/// `Turn on backup to automatically upload files added to this device folder to ente.` /// `Turn on backup to automatically upload files added to this device folder to Ente.`
String get turnOnBackupForAutoUpload { String get turnOnBackupForAutoUpload {
return Intl.message( return Intl.message(
'Turn on backup to automatically upload files added to this device folder to ente.', 'Turn on backup to automatically upload files added to this device folder to Ente.',
name: 'turnOnBackupForAutoUpload', name: 'turnOnBackupForAutoUpload',
desc: '', desc: '',
args: [], args: [],
@ -6149,10 +6149,10 @@ class S {
); );
} }
/// `You can still access {count, plural, one {it} other {them}} on ente as long as you have an active subscription` /// `You can still access {count, plural, one {it} other {them}} on Ente as long as you have an active subscription`
String freeUpAccessPostDelete(int count) { String freeUpAccessPostDelete(int count) {
return Intl.message( return Intl.message(
'You can still access ${Intl.plural(count, one: 'it', other: 'them')} on ente as long as you have an active subscription', 'You can still access ${Intl.plural(count, one: 'it', other: 'them')} on Ente as long as you have an active subscription',
name: 'freeUpAccessPostDelete', name: 'freeUpAccessPostDelete',
desc: '', desc: '',
args: [count], args: [count],
@ -6469,10 +6469,10 @@ class S {
); );
} }
/// `Selected files are not on ente` /// `Selected files are not on Ente`
String get selectedFilesAreNotOnEnte { String get selectedFilesAreNotOnEnte {
return Intl.message( return Intl.message(
'Selected files are not on ente', 'Selected files are not on Ente',
name: 'selectedFilesAreNotOnEnte', name: 'selectedFilesAreNotOnEnte',
desc: '', desc: '',
args: [], args: [],
@ -6559,10 +6559,10 @@ class S {
); );
} }
/// `Some items are in both ente and your device.` /// `Some items are in both Ente and your device.`
String get someItemsAreInBothEnteAndYourDevice { String get someItemsAreInBothEnteAndYourDevice {
return Intl.message( return Intl.message(
'Some items are in both ente and your device.', 'Some items are in both Ente and your device.',
name: 'someItemsAreInBothEnteAndYourDevice', name: 'someItemsAreInBothEnteAndYourDevice',
desc: '', desc: '',
args: [], args: [],
@ -7472,10 +7472,10 @@ class S {
); );
} }
/// `Add 5 family members to your existing plan without paying extra.\n\nEach member gets their own private space, and cannot see each other's files unless they're shared.\n\nFamily plans are available to customers who have a paid ente subscription.\n\nSubscribe now to get started!` /// `Add 5 family members to your existing plan without paying extra.\n\nEach member gets their own private space, and cannot see each other's files unless they're shared.\n\nFamily plans are available to customers who have a paid Ente subscription.\n\nSubscribe now to get started!`
String get familyPlanOverview { String get familyPlanOverview {
return Intl.message( return Intl.message(
'Add 5 family members to your existing plan without paying extra.\n\nEach member gets their own private space, and cannot see each other\'s files unless they\'re shared.\n\nFamily plans are available to customers who have a paid ente subscription.\n\nSubscribe now to get started!', 'Add 5 family members to your existing plan without paying extra.\n\nEach member gets their own private space, and cannot see each other\'s files unless they\'re shared.\n\nFamily plans are available to customers who have a paid Ente subscription.\n\nSubscribe now to get started!',
name: 'familyPlanOverview', name: 'familyPlanOverview',
desc: '', desc: '',
args: [], args: [],
@ -7845,10 +7845,10 @@ class S {
); );
} }
/// `Invite your friends to ente` /// `Invite your friends to Ente`
String get inviteYourFriendsToEnte { String get inviteYourFriendsToEnte {
return Intl.message( return Intl.message(
'Invite your friends to ente', 'Invite your friends to Ente',
name: 'inviteYourFriendsToEnte', name: 'inviteYourFriendsToEnte',
desc: '', desc: '',
args: [], args: [],
@ -7945,10 +7945,10 @@ class S {
); );
} }
/// `This account is linked to other ente apps, if you use any. Your uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted.` /// `This account is linked to other Ente apps, if you use any. Your uploaded data, across all Ente apps, will be scheduled for deletion, and your account will be permanently deleted.`
String get deleteConfirmDialogBody { String get deleteConfirmDialogBody {
return Intl.message( return Intl.message(
'This account is linked to other ente apps, if you use any. Your uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted.', 'This account is linked to other Ente apps, if you use any. Your uploaded data, across all Ente apps, will be scheduled for deletion, and your account will be permanently deleted.',
name: 'deleteConfirmDialogBody', name: 'deleteConfirmDialogBody',
desc: '', desc: '',
args: [], args: [],

View file

@ -52,6 +52,15 @@ class RemoteSyncService {
bool _isExistingSyncSilent = false; bool _isExistingSyncSilent = false;
static const kHasSyncedArchiveKey = "has_synced_archive"; static const kHasSyncedArchiveKey = "has_synced_archive";
/* This setting is used to maintain a list of local IDs for videos that the user has manually
marked for upload, even if the global video upload setting is currently disabled.
When the global video upload setting is disabled, we typically ignore all video uploads. However, for videos that have been added to this list, we
want to still allow them to be uploaded, despite the global setting being disabled.
This allows users to queue up videos for upload, and have them successfully upload
even if they later toggle the global video upload setting to disabled.
*/
static const _ignoreBackUpSettingsForIDs_ = "ignoreBackUpSettingsForIDs";
final String _isFirstRemoteSyncDone = "isFirstRemoteSyncDone"; final String _isFirstRemoteSyncDone = "isFirstRemoteSyncDone";
// 28 Sept, 2021 9:03:20 AM IST // 28 Sept, 2021 9:03:20 AM IST
@ -189,6 +198,18 @@ class RemoteSyncService {
return _prefs.containsKey(_isFirstRemoteSyncDone); return _prefs.containsKey(_isFirstRemoteSyncDone);
} }
Future<bool> whiteListVideoForUpload(EnteFile file) async {
if (file.fileType == FileType.video &&
!_config.shouldBackupVideos() &&
file.localID != null) {
final List<String> whitelistedIDs =
_prefs.getStringList(_ignoreBackUpSettingsForIDs_) ?? <String>[];
whitelistedIDs.add(file.localID!);
return _prefs.setStringList(_ignoreBackUpSettingsForIDs_, whitelistedIDs);
}
return false;
}
Future<void> _pullDiff() async { Future<void> _pullDiff() async {
_logger.info("Pulling remote diff"); _logger.info("Pulling remote diff");
final isFirstSync = !_collectionsService.hasSyncedCollections(); final isFirstSync = !_collectionsService.hasSyncedCollections();
@ -524,8 +545,13 @@ class RemoteSyncService {
final List<EnteFile> filesToBeUploaded = []; final List<EnteFile> filesToBeUploaded = [];
int ignoredForUpload = 0; int ignoredForUpload = 0;
int skippedVideos = 0; int skippedVideos = 0;
final whitelistedIDs =
(_prefs.getStringList(_ignoreBackUpSettingsForIDs_) ?? <String>[])
.toSet();
for (var file in originalFiles) { for (var file in originalFiles) {
if (shouldRemoveVideos && file.fileType == FileType.video) { if (shouldRemoveVideos &&
(file.fileType == FileType.video &&
!whitelistedIDs.contains(file.localID))) {
skippedVideos++; skippedVideos++;
continue; continue;
} }

View file

@ -133,9 +133,7 @@ class FileAppBarState extends State<FileAppBar> {
), ),
); );
} }
actions.add(
PopupMenuButton(
itemBuilder: (context) {
final List<PopupMenuItem> items = []; final List<PopupMenuItem> items = [];
if (widget.file.isRemoteFile) { if (widget.file.isRemoteFile) {
items.add( items.add(
@ -175,9 +173,7 @@ class FileAppBarState extends State<FileAppBar> {
padding: EdgeInsets.all(8), padding: EdgeInsets.all(8),
), ),
Text( Text(
isArchived isArchived ? S.of(context).unarchive : S.of(context).archive,
? S.of(context).unarchive
: S.of(context).archive,
), ),
], ],
), ),
@ -244,6 +240,10 @@ class FileAppBarState extends State<FileAppBar> {
); );
} }
} }
if (items.isNotEmpty) {
actions.add(
PopupMenuButton(
itemBuilder: (context) {
return items; return items;
}, },
onSelected: (dynamic value) async { onSelected: (dynamic value) async {
@ -261,6 +261,7 @@ class FileAppBarState extends State<FileAppBar> {
}, },
), ),
); );
}
return AppBar( return AppBar(
iconTheme: iconTheme:
const IconThemeData(color: Colors.white), //same for both themes const IconThemeData(color: Colors.white), //same for both themes

View file

@ -125,6 +125,8 @@ class _UpdateIconWidgetState extends State<UploadIconWidget> {
.id; .id;
await FilesDB.instance.insert(widget.file); await FilesDB.instance.insert(widget.file);
} }
await RemoteSyncService.instance
.whiteListVideoForUpload(widget.file);
RemoteSyncService.instance.sync().ignore(); RemoteSyncService.instance.sync().ignore();
if (mounted) { if (mounted) {
setState(() { setState(() {