修复意见反馈提示顺序混乱问题
This commit is contained in:
@ -516,36 +516,18 @@ public class MainActivity extends BaseActivity implements OnClickListener {
|
||||
.getSuggestionType()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Response<SuggestionTypeEntity>() {
|
||||
.subscribe(new Response<ResponseBody>() {
|
||||
@Override
|
||||
public void onResponse(SuggestionTypeEntity response) {
|
||||
public void onResponse(ResponseBody response) {
|
||||
super.onResponse(response);
|
||||
Set<String> suggestionGame = response.getGame();
|
||||
Set<String> suggestionLibao = response.getLibao();
|
||||
Set<String> suggestionPlugin = response.getPlugin();
|
||||
Set<String> suggestionService = response.getService();
|
||||
SharedPreferences.Editor edit = sp.edit();
|
||||
if (suggestionGame.size() != 0) {
|
||||
edit.putStringSet("suggestionGame", suggestionGame);
|
||||
} else {
|
||||
edit.remove("suggestionGame");
|
||||
try {
|
||||
String string = response.string();
|
||||
SharedPreferences.Editor edit = sp.edit();
|
||||
edit.putString("SuggestionType", string);
|
||||
edit.apply();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (suggestionLibao.size() != 0) {
|
||||
edit.putStringSet("suggestionLibao", suggestionLibao);
|
||||
} else {
|
||||
edit.remove("suggestionLibao");
|
||||
}
|
||||
if (suggestionPlugin.size() != 0) {
|
||||
edit.putStringSet("suggestionPlugin", suggestionPlugin);
|
||||
} else {
|
||||
edit.remove("suggestionPlugin");
|
||||
}
|
||||
if (suggestionService.size() != 0) {
|
||||
edit.putStringSet("suggestionService", suggestionService);
|
||||
} else {
|
||||
edit.remove("suggestionService");
|
||||
}
|
||||
edit.apply();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user