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

Fix Attachments on mobile #209

Open
Tourniquet88 opened this issue Sep 4, 2020 · 4 comments
Open

Fix Attachments on mobile #209

Tourniquet88 opened this issue Sep 4, 2020 · 4 comments

Comments

@Tourniquet88
Copy link

Tourniquet88 commented Sep 4, 2020

Since a long time Attachments on mobile do not work. I now know why:

The problem is, as soon as you open the file picker on mobile the app suspends. Even if its just for a short time. When you select the picture / file you want to send, you go back to the conversation view. Now you can see for a splitsecond the attachment, but it will get removed because for whatever reason the "public void Load(SignalConversation conversation)" is being called and with that you "ResetInput();" everything, hence the Attachment is going to be removed right away.

Sadly I do not know why the Load procedure is being called. On my end I added a stupid workaround with a bool "NeedToSendAttachment" in the load procedure to prevent it to "ResetInput" when you're attaching a file. It's not a (good) fix.

At least I'm now able to send Attachments from my Lumia :)

Would be nice if that gets properly fixed in the future though.

@clemensott
Copy link
Contributor

The Load function ("public void Load(SignalConversation conversation)") gets call because of "App_Resuming" in App.xam.cs. I'm not sure what would be the best solution, but I solved it by not calling ResetInput() when the ThreadIds of the old and new conversations are the same.

bool conversationThreadIdChanged = SignalConversation?.ThreadId != conversation?.ThreadId;

[...]

if (conversationThreadIdChanged)
{
    LastMarkReadRequest = -1;
    SendButtonEnabled = false;
    ResetInput();
}

I'm not sure if not setting LastMarkReadRequest and SendButtonEnabled is a good idea.

@golf1052
Copy link
Member

I've started looking at fixing attachments. This PR signal-csharp/libsignal-service-dotnet#45 goes over what is needed to get them working again.

@Tourniquet88
Copy link
Author

I've started looking at fixing attachments. This PR signal-csharp/libsignal-service-dotnet#45 goes over what is needed to get them working again.

That's actually not related to this mobile problem though? The issue was specifically a mobile issue that was related to the Keyboad popup which always resets the "input" model so that you can't actually send an attachment, because it was reset all the time?

@golf1052 golf1052 self-assigned this Mar 8, 2021
@golf1052 golf1052 added awaiting release For things that are fixed but are waiting a store release and removed awaiting release For things that are fixed but are waiting a store release labels Mar 12, 2021
@golf1052
Copy link
Member

This should be fixed in 0.3.1 which is now in the store. Can you update and check that this works?

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

No branches or pull requests

3 participants