Android client. Fixed the bug status message wouldn't applied sometimes
before, I was placed the status handling on onCmdSuccess method, which was incorrect, and status wouldn't be set when it tryed to retreave when network is not yet properly ready. But now, I've moved it to onCmdMyselfLoggedIn method, which means everything network related is fully set up before status aply, so this problem will no longer happen on any network or anymore
@bear101 please also merge this. Thx
I explaned in the discription. I moved status handling code to myself logged in method to ensure no random losses happen. It was happening because it was placed in onCmdSuccess which sometimes status message would faled to apply due to randomly objects were not yet inisulised. I made it stable like the others. Don't worry, I've tested and I know what i'm doing Thanks!
@bear101 can you please aprove this as well? don't worry. This feature was implemented by me myself at first, So I know what i'm doing with it. So don't worry. Thanks.
when this handling was on on_cmd_suckss method, when sometimes user clicked on a server to connect to the server, the status would only be aplyed correctly if the network was fast enough to get the objects ready before ttclient.doChangeStatus could do its job correctly, resulted that moste of the times due to random network, the status didn't aply because object was not yet ready, and we tryed to retreave it, which didn't work. But moving it to myself logged in method allowed me to also clean it a bit and no longer use some unneeded things, and now status will always be aplyed because it'll only run when the server is fully connected and logged in, and everything and all objects are is ready.
It seems to me that with this change you reset status-mode/status-message whereas it before restored the existing status-mode/status-message.
I believe users would prefer restoring status-mode/status-message to resetting it. At least that's what we do in the Qt TeamTalk client.
no, I'm not doing it. It's exactly same as before. I'm just now sure that all objects are ready before status aplys. It's the same lojic, I've just moved it to another method
I've tested this in all possible cases before pushing to github. It works perfectly as expected. This feature is desighned by me (myself). Please trust me
@bear101 can you please merge this pull request? It's a simple moove. I wanted to place this handling to on_myself_logged_in method at first when I was Implementing this feature, But I don't know why I placed it in that incorrect place. And now it's open and I'd have to fix conflicts. Please trust me and merge this pull request And I can work on other things I plan for teamtalk android
Don't bother the developers. They'll merge or close it someday.
Yeah, as you said, it seems like there's no problem. I think we can merge them for now. If there's a problem, we can just revert them later, right?
yes. I said this has no problem. I'm a developer of teamtalk android, I contributed hundrids and hundrids of code to teamtalk android, I Don't know why my pull request should stayed pending, while I know what i'm doing and i'm sure I won't submit a bad pull request to teamtalk
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext());
int statusmode = TeamTalkConstants.STATUSMODE_AVAILABLE;
String statusmsg = ttserver.statusmsg;
if (TextUtils.isEmpty(statusmsg)) {
statusmsg = prefs.getString(Preferences.PREF_GENERAL_STATUSMSG, "");
}
if (prefs.getBoolean(Preferences.PREF_GENERAL_GENDER, false))
statusmode |= TeamTalkConstants.STATUSMODE_FEMALE;
ttclient.doChangeStatus(statusmode, statusmsg);
}
This lojic, which was the same as the one in on_cmd method, does the following
if you have a status message set for your server, that one will be set. If not, the gloebel status message will be set. If your gender checkbox is checked, it'll set you as femail, otherwise you are mail. Which is the correct approuch. Can you please kindly tell me what is your clear problem with this?
Rather, I'd like to ask: Why did you change it like that? You didn't seem to explain the reason, so if I missed it, I apologize.
this is the exactly same method, but before I placed it in the incorrect place, now I moved it to its correct place. That's all what I did
@hwangsihu you apparently have right access so can't you merge this yourself?
I don't have full access either. I can only merge changes the way I want if the code owner approves them. And most importantly, I don't want to arbitrarily merge anything that the developer hasn't yet decided to merge.
By the way, did you see @bear101's comment?
@hwangsihu yes I saw his comment, but I didn't understood. This pull request is tested in my own device, it is well functioning. It is working as expected. If you don't beleave my words, you can just compile it and install it on your phone, and see if you can find a bug? Whenever I want to implement something or fix a bug, I'm totally testing it in all possible cases. I'm not a new programmer. I implemented moste of the current teamtalk android's functions. But you are being disrespectful to me by saying i'm not doing this.
@bear101 I have a suggestion for you. If you want, you can take it. You don't work in this project anymore at all. I haven't seen a new feature from you for the last fue years. So if you don't want to work on this project, at least please let other contributors who are interested on this project to work on it. In the last year, the moste activity of this project belongs to corentin for qt teamtalk, and me for teamtalk android. Everyone is thanking me for redesighning the teamtalk android and make it nice this way.
First of all, I apologize if my words came across as rude. But I wasn't ignoring you. I was just wondering why the logic changed, but I understand.
@hwangsihu it's ok. I'm not upset with you. But I don't know why people are doing like this. Again, if anyone doesn't beleave me, they can look at the history of my merged pull requests, and they can see that I worked on teamtalk android more than anyone else did. More than 40 change log entrys are belong to me in teamtalk android, and I modifyed hundrids and hundrids of the code lines
@amirmahdifard quantity does not equal quality
@bear101 ok now I understand what problem you are talking about. It caused because @hwangsihu modifyed my lojic to make it exactly same as the old one, but the condition is diffrent hear. I'll fix it again
@bear101 please merge now. Now everything is correct
@bear101 can you please merge this as wel so I can start the other works? thank you a lot bro!