Profile Images #355

Merged
erinn merged 9 commits from custom_profile_images into trunk 8 months ago
sarah commented 8 months ago
Owner
There is no content yet.
dan was assigned by sarah 8 months ago
erinn was assigned by sarah 8 months ago
sarah added 1 commit 8 months ago
3d85883f8e Profile Images
dan reviewed 8 months ago
});
}
void _showFilePicker(BuildContext ctx) async {
dan commented 8 months ago
Owner

instead of copying aroind the _filepicker function can we make it a reusable widget that takes a function to handle the payload?

instead of copying aroind the _filepicker function can we make it a reusable widget that takes a function to handle the payload?
sarah marked this conversation as resolved
if (file.lengthSync() <= 10737418240) {
var profile = Provider.of<ProfileInfoState>(context, listen: false).onion;
// Share this image publically (conversation handle == -1)
Provider.of<FlwtchState>(context, listen: false).cwtch.ShareFile(profile, -1, file.path);
dan commented 8 months ago
Owner

Is there anyway ShareFile can be made more generic and return the filehandle or what not and then a seperate call here can set the profile Attribute for picture. calling sharefile this way to set profile picture feels like a pretty hacky and hidden API "feature".

This may be out of scope but what happens if we pick a new profile pic, is the previous one still being shared as well?

Is there anyway ShareFile can be made more generic and return the filehandle or what not and then a seperate call here can set the profile Attribute for picture. calling sharefile this way to set profile picture feels like a pretty hacky and hidden API "feature". This may be out of scope but what happens if we pick a new profile pic, is the previous one still being shared as well?
sarah commented 8 months ago
Poster
Owner

. calling sharefile this way to set profile picture feels like a pretty hacky and hidden API "feature".

Yup: https://git.openprivacy.ca/cwtch.im/libcwtch-go/src/branch/trunk/lib.go#L741

This falls into the question of how we want to manage file sharing going forward. Currently there is a lot of design space unexplored e.g. do we want to support arbitrary public files? How should we manage them? Do we want to expose specific apis for that v.s. conversation specific apis.

For now, because profile images are the only public files shared, the API does that work for simplicity. It is very likely if we want to go down the path of multiple public files (e.g. keys, stickers, audio) then we are going to need a radically different API (and it will likely not involve returning a filekey to the UI).

This may be out of scope but what happens if we pick a new profile pic, is the previous one still being shared as well?

It will continue being shared until cwtch is restarted or until 30 days after it was last shared. At some point we will probably want to build an explicit "unshareFile" api.

> . calling sharefile this way to set profile picture feels like a pretty hacky and hidden API "feature". Yup: https://git.openprivacy.ca/cwtch.im/libcwtch-go/src/branch/trunk/lib.go#L741 This falls into the question of how we want to manage file sharing going forward. Currently there is a lot of design space unexplored e.g. do we want to support arbitrary public files? How should we manage them? Do we want to expose specific apis for that v.s. conversation specific apis. For now, because profile images are the only public files shared, the API does that work for simplicity. It is very likely if we want to go down the path of multiple public files (e.g. keys, stickers, audio) then we are going to need a radically different API (and it will likely not involve returning a filekey to the UI). > This may be out of scope but what happens if we pick a new profile pic, is the previous one still being shared as well? It will continue being shared until cwtch is restarted or until 30 days after it was last shared. At some point we will probably want to build an explicit "unshareFile" api.
dan commented 8 months ago
Owner

ugh, i hate it, but its appropriatly commented at least and assumed to prolly be changed with in the year as we continue to develop this so fine, approved! lol

ugh, i hate it, but its appropriatly commented at least and assumed to prolly be changed with in the year as we continue to develop this so fine, approved! lol
dan marked this conversation as resolved
sarah added 1 commit 8 months ago
c6192ef736 Factor out showFilePicker into a generic controller
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch-ui/553
dan approved these changes 8 months ago
sarah added 2 commits 8 months ago
sarah added 2 commits 8 months ago
sarah added 1 commit 8 months ago
d902ba5cce Rename Constant
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch-ui/555
sarah added 1 commit 8 months ago
403454d6b8 Add Edit Badge
sarah added 1 commit 8 months ago
bf4cfde7df Fixup Context Listen
erinn approved these changes 8 months ago
erinn merged commit 729ff6811e into trunk 8 months ago

Reviewers

dan approved these changes 8 months ago
erinn approved these changes 8 months ago
continuous-integration/drone/pr Build is pending
The pull request has been merged as 729ff6811e.
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: cwtch.im/cwtch-ui#355
Loading…
There is no content yet.