mirror of
https://github.com/moparisthebest/k-9
synced 2025-01-30 23:00:09 -05:00
Fix crash when remote search fails after search screen has been left
Also, change error message to be less technical.
This commit is contained in:
parent
5accadab00
commit
4eefcb3a31
@ -1139,6 +1139,7 @@ http://k9mail.googlecode.com/
|
||||
<string name="remote_search_sending_query">Sending query to server</string>
|
||||
<string name="remote_search_downloading">Fetching %d results</string>
|
||||
<string name="remote_search_downloading_limited">Fetching %1$d of %2$d results</string>
|
||||
<string name="remote_search_error">Remote search failed</string>
|
||||
|
||||
<string name="account_settings_search">Search</string>
|
||||
<string name="account_settings_remote_search_enabled">Enable server search</string>
|
||||
|
@ -1428,11 +1428,14 @@ public class MessageListFragment extends SherlockFragment implements OnItemClick
|
||||
class MessageListActivityListener extends ActivityListener {
|
||||
@Override
|
||||
public void remoteSearchFailed(Account acct, String folder, final String err) {
|
||||
//TODO: Better error handling
|
||||
mHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), err, Toast.LENGTH_LONG).show();
|
||||
Activity activity = getActivity();
|
||||
if (activity != null) {
|
||||
Toast.makeText(activity, R.string.remote_search_error,
|
||||
Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user