ManeraKai / simplytranslate_mobile

Privacy friendly frontend to Google Translate
https://manerakai.github.io/simplytranslate_mobile/
GNU General Public License v3.0
173 stars 15 forks source link

Icon "Paste" after smartphone is put to sleep #92

Closed Valdnet closed 3 years ago

Valdnet commented 3 years ago

Steps:

  1. Run the program.
  2. Put your smartphone to sleep.
  3. Wake up the smartphone.

The "Paste" icon is inactive after waking up the smartphone (maybe an empty clipboard lock is working).

Before sleep:

obraz

After sleep:

obraz

ManeraKai commented 3 years ago

Even if you put it in background. Same thing happens.

ManeraKai commented 3 years ago

It's really weird. Here I'm printing the clipboard data every resume of the app. It's giving me null: image

ManeraKai commented 3 years ago

But if I let it be active for the whole time. The paste function works inside the paste widget.

ManeraKai commented 3 years ago

If closed automatically, If you found any problem. You can open it. I've tested it on the emulator and my real device. Worked quietly.

Valdnet commented 3 years ago

Steps:

  1. Clear the clipboard.
  2. Launch the application.
  3. Put your smartphone to sleep.
  4. Wake up the smartphone.

In the new version, the behavior of the "Paste" icon is now as follows: If the clipboard is empty, then after the smartphone is put to sleep or when it is running in the background, the "Paste" icon becomes active.

ManeraKai commented 3 years ago

This is happening to me in the real device too. I think it should just be active all the time. It really doesn't hurt the user. I wish it was responsive, but I tried.

Valdnet commented 3 years ago

It really doesn't hurt the user.

Hehe, but it hurts the reputation of the application 😁.

Let you leave this issue open. Maybe you will find some more solution.

Valdnet commented 3 years ago

Closed for issue #96.

ManeraKai commented 3 years ago

Try it: https://github.com/ManeraKai/simplytranslate-flutter-client/actions/runs/1302530551

Valdnet commented 3 years ago

When you put your smartphone to sleep with the contents of the clipboard, the "Paste" icon is inactive.

ManeraKai commented 3 years ago

When I switch between apps, it pauses the app and resumes it when opened back. However, sleeping or locking the phone weirdly empties the clipboard. I'll try to find a workaround like waiting some seconds before checking.

ManeraKai commented 3 years ago

Try it: https://github.com/ManeraKai/simplytranslate-flutter-client/actions/runs/1302685724

Valdnet commented 3 years ago

Now it works fine 👍.