Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto upload from specific Albums #3257

Open
wants to merge 31 commits into
base: develop
Choose a base branch
from
Open

Auto upload from specific Albums #3257

wants to merge 31 commits into from

Conversation

mpivchev
Copy link
Collaborator

@mpivchev mpivchev commented Jan 3, 2025

This adds the ability to select which album(s) to auto upload.

  • If no album is chosen, Camera Roll is chosen by default.
  • Works on a multi-account setup
  • Redesigned some parts of the auto upload screen, and added a proper button that is the focus point of all the settings.

Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
…upload-albums

Signed-off-by: Milen Pivchev <[email protected]>

# Conflicts:
#	Nextcloud.xcodeproj/project.pbxproj
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
…upload-albums

Signed-off-by: Milen Pivchev <[email protected]>

# Conflicts:
#	Nextcloud.xcodeproj/project.pbxproj
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
@mpivchev mpivchev marked this pull request as ready for review January 16, 2025 13:41
Copy link

@i2h3 i2h3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not tested it functionally yet.

iOSClient/Extensions/PHAssetCollection+Extension.swift Outdated Show resolved Hide resolved
iOSClient/Settings/AutoUpload/Albums.swift Outdated Show resolved Hide resolved
iOSClient/Settings/SelectAlbum/AlbumModel.swift Outdated Show resolved Hide resolved
iOSClient/Settings/SelectAlbum/SelectAlbumView.swift Outdated Show resolved Hide resolved
iOSClient/Networking/NCAutoUpload.swift Show resolved Hide resolved
iOSClient/Settings/AutoUpload/NCAutoUploadModel.swift Outdated Show resolved Hide resolved
iOSClient/Settings/AutoUpload/NCAutoUploadView.swift Outdated Show resolved Hide resolved
Comment on lines +177 to +184
.tint(Color(NCBrandColor.shared.getElement(account: model.session.account)))
.onChange(of: model.autoUploadFull) { newValue in
albumModel.populateSelectedAlbums()
model.handleAutoUploadChange(newValue: newValue, assetCollections: albumModel.selectedAlbums)
}
.font(.headline)
.toggleStyle(.button)
.buttonStyle(.bordered)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't there a common reusable SwiftUI view for this kind of button or is this here a unique appearance?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there is a predefined component for this, it's a toggle that looks like a button.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I meant within our own code in the project. Don't we have similar buttons elsewhere?

iOSClient/Settings/SelectAlbum/SelectAlbumView.swift Outdated Show resolved Hide resolved
iOSClient/Settings/SelectAlbum/SelectAlbumView.swift Outdated Show resolved Hide resolved
Co-authored-by: Iva Horn <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
@mpivchev
Copy link
Collaborator Author

@i2h3 Did you manage to check functionality?

@i2h3
Copy link

i2h3 commented Jan 28, 2025

@i2h3 Did you manage to check functionality?

I wanted to wait for the code changes first. Now I am stuck in a lot of other tasks of higher priority.

@mpivchev mpivchev linked an issue Jan 30, 2025 that may be closed by this pull request
@i2h3
Copy link

i2h3 commented Jan 31, 2025

Layout Improvements Needed

Screenshots taken on iPad 11" in landscape orientation.

Automatic Uploads

  • The scrollable content does not have any padding to the navigation bar.

Automatic Uploads

Album Selection

  • The scrollable content does not have any padding to the navigation bar.
  • The navigation title is not utilized.

Album Selection

@i2h3
Copy link

i2h3 commented Jan 31, 2025

Settings Not Reenabled After Uploads Completed

I waited for the automatic uploads of my favorites album to complete. The settings controls are not reenabled after completion. I wanted to also enable automatic upload of videos which I cannot. Navigating back and forth in the settings or selecting different tabs in the app does not help.

I first need to tap the stop button for the automatic uploading. That was not clear to me.

The German footer of the button "Obenstehende Optionen vor dem Hochladen anpassen." does not make much sense to me. The English reference is "Adjust the options above before uploading.". Either the translators need more context or the string needs to be more expressive.

I am a bit irritated by the necessity of manually starting and stopping the automatic upload which then I would not consider fully automated anymore. I would have assumed the upload actually is already enabled by the switch on the top.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auto Upload photos only from a specific Album
2 participants