Profile Images #355

Merged
erinn merged 9 commits from custom_profile_images into trunk 2022-02-07 23:16:47 +00:00
Owner
No description provided.
dan was assigned by sarah 2022-02-05 00:58:35 +00:00
erinn was assigned by sarah 2022-02-05 00:58:35 +00:00
sarah added 1 commit 2022-02-05 00:58:35 +00:00
continuous-integration/drone/pr Build is pending Details
3d85883f8e
Profile Images
dan reviewed 2022-02-05 14:17:51 +00:00
@ -66,6 +68,37 @@ class _AddEditProfileViewState extends State<AddEditProfileView> {
});
}
void _showFilePicker(BuildContext ctx) async {
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
@ -69,0 +86,4 @@
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);
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?
Author
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.
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 2022-02-07 19:30:37 +00:00
continuous-integration/drone/pr Build is passing Details
c6192ef736
Factor out showFilePicker into a generic controller
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch-ui/553
dan approved these changes 2022-02-07 20:09:31 +00:00
sarah added 2 commits 2022-02-07 20:23:39 +00:00
sarah added 2 commits 2022-02-07 22:55:07 +00:00
sarah added 1 commit 2022-02-07 22:59:19 +00:00
continuous-integration/drone/pr Build is pending Details
d902ba5cce
Rename Constant
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch-ui/555
sarah added 1 commit 2022-02-07 23:12:44 +00:00
continuous-integration/drone/pr Build is pending Details
403454d6b8
Add Edit Badge
sarah added 1 commit 2022-02-07 23:16:12 +00:00
continuous-integration/drone/pr Build is pending Details
bf4cfde7df
Fixup Context Listen
erinn approved these changes 2022-02-07 23:16:31 +00:00
erinn merged commit 729ff6811e into trunk 2022-02-07 23:16:47 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cwtch.im/cwtch-ui#355
No description provided.