HabitRPG / habitrpg-mobile

HabitRPG mobile application under development. Angular + PhoneGap
286 stars 99 forks source link

Notifications unreadable due to lag. Fade time should be customizable. #362

Closed Sduibek closed 9 years ago

Sduibek commented 9 years ago

I am using the Android version of HabitRPG mobile. Lag is experienced under various circumstances, but the issue here isn't lag per se:

The notifications last what seems like 2 to 3 seconds. Unfortunately, sometimes lag lasts as long as 5 seconds. This means many times I'll + or - a Habit/Daily/ToDo and have no idea what the effect was, because the notification fades too quickly or doesn't even display at all.

Please consider adding an in-game option to customize the fade time above the 2-to-3-second range. That will allow this to become a non-issue even if the lag issues remain.

How difficult would it be to implement a customization to this timer?

HabitRPG 0.0.50 Device SGH-T999 Android OS 4.3 Android Kernel 3.0.31-1962493 Android Build JSS15J.T999UVUENC2

Sduibek commented 9 years ago

I presume the values in question are these ones from notificationServices.js?

            if (timer) {
                clearTimeout(timer);
                timer = setTimeout(this.hide, 2000)
            }

            if (active == false) {
                active = true;

                $('#notification').transition({ y: notifyheight, x: 0 });
                timer = setTimeout(this.hide, 2000);
            }

        init: function () {
            timer = setTimeout(this.hide, 2000);
        }
sgabler commented 9 years ago

I am experiencing the same thing on a Motorola Moto G (1st Gen.). Without having looked at the code, couldn't this be solved differently?

Let's say I want to finish one of my dailies, so I add a checkmark. This calls the API and waits for a result. The moment I add the checkmark, I see a loading bar (similar to the homepage). Waiting for the result can take a few seconds. Once the result/response is there, the app shows the notification for a set amount of time.

The point is: only show the notification when the result is actually there, and also give feedback that something is actually happening after adding a checkmark.

Might need to look at the code at some point, though :wink:

Sduibek commented 9 years ago

Created a pull request https://github.com/HabitRPG/habitrpg-mobile/pull/375 with a small workaround for this issue, pending the move away from PhoneGap and into native code.

crookedneighbor commented 9 years ago

I'm closing this because we're actively working on native apps and this app will soon be deprecated.

For iOS users, you can download the app here and see the source code here.

For Android users, we're finishing up the initial version and will release it soon. I will post here when it is ready

Sduibek commented 9 years ago

Looking forward to the native apps :) Thanks!