Skip to content

Commit

Permalink
Removing unsued functions
Browse files Browse the repository at this point in the history
  • Loading branch information
markwinter committed Mar 27, 2014
1 parent fcc6caf commit e20fca9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
14 changes: 0 additions & 14 deletions app/src/main/java/im/tox/antox/fragments/ContactsFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ public void onClick(DialogInterface dialog,
db.deleteFriend(key);
db.close();
clearChat(key);
updateOrderList(key);
main_act.updateLeftPane();
Intent intent = new Intent(getActivity(), ToxService.class);
intent.setAction(Constants.DELETE_FRIEND_AND_CHAT);
Expand All @@ -286,7 +285,6 @@ public void onClick(DialogInterface dialog,
db.deleteFriend(key);
db.close();
clearChat(key);
updateOrderList(key);
main_act.updateLeftPane();
Intent intent = new Intent(getActivity(), ToxService.class);
intent.setAction(Constants.DELETE_FRIEND);
Expand All @@ -307,16 +305,4 @@ public void clearChat(String key)
main_act.activeTitle="Antox";
}
}
public void updateOrderList(String key)
{
SharedPreferences pref = getActivity().getSharedPreferences("order", Context.MODE_PRIVATE);
SharedPreferences.Editor editor = pref.edit();
String serialized = pref.getString("PREF_KEY_STRINGS", null);//if the list is null, add the same order as in DB
List<String> list = new LinkedList(Arrays.asList(TextUtils.split(serialized, ",")));
list.remove(key);
editor.remove("PREF_KEY_STRINGS");
editor.commit();
editor.putString("PREF_KEY_STRINGS", TextUtils.join(",", list));
editor.commit();
}
}
2 changes: 1 addition & 1 deletion app/src/main/java/im/tox/antox/tox/ToxService.java
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ else if (newSettings[1].equals("Busy"))
Log.d(TAG, "Saving request");

Log.d(TAG, "Tox friend list updated. New size: " + toxSingleton.friendsList.all().size());


} catch (Exception e) {

Expand Down

0 comments on commit e20fca9

Please sign in to comment.