Skip to content

Commit

Permalink
Fix name not being set when starting antox for the first time
Browse files Browse the repository at this point in the history
  • Loading branch information
markwinter committed May 2, 2014
1 parent 938ff8a commit 8c8314d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,6 @@ protected void onCreate(Bundle savedInstanceState) {
* @param view
*/
public void updateSettings(View view) {
/**
* String array to store updated details to be passed by intent to ToxService
*/
String[] updatedSettings = { null, null, null};

/* Save settings to file */

SharedPreferences pref = getSharedPreferences("settings",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package im.tox.antox.activities;

import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
Expand All @@ -14,6 +15,8 @@
import android.widget.Toast;

import im.tox.antox.R;
import im.tox.antox.tox.ToxService;
import im.tox.antox.utils.Constants;
import im.tox.antox.utils.UserDetails;
import im.tox.jtoxcore.ToxUserStatus;

Expand Down Expand Up @@ -80,6 +83,10 @@ public void updateSettings(View view) {
UserDetails.note = "";
UserDetails.status = ToxUserStatus.TOX_USERSTATUS_NONE;

Intent updateSettings = new Intent(this, ToxService.class);
updateSettings.setAction(Constants.UPDATE_SETTINGS);
this.startService(updateSettings);

/* Save the fact the user has seen the welcome message */
SharedPreferences.Editor editorMain;
SharedPreferences prefMain = getSharedPreferences("main",
Expand Down

0 comments on commit 8c8314d

Please sign in to comment.