mirror of
https://github.com/whyorean/AuroraStore.git
synced 2026-06-20 21:50:19 -04:00
Showing a proper message if app details request fails
This commit is contained in:
@@ -75,6 +75,8 @@ public class DetailsActivity extends YalpStoreActivity {
|
||||
if (this.app != null) {
|
||||
DetailsDependentActivity.app = this.app;
|
||||
drawDetails(this.app);
|
||||
} else {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -7,6 +7,8 @@ import android.graphics.drawable.Drawable;
|
||||
|
||||
import com.github.yeriomin.yalpstore.model.App;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class DetailsTask extends GoogleApiAsyncTask {
|
||||
|
||||
protected App app;
|
||||
@@ -17,6 +19,13 @@ public class DetailsTask extends GoogleApiAsyncTask {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void processIOException(IOException e) {
|
||||
if (null != e) {
|
||||
toast(this.context, R.string.details_not_available_on_play_store);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Throwable doInBackground(String... params) {
|
||||
PlayStoreApiWrapper wrapper = new PlayStoreApiWrapper(this.context);
|
||||
|
||||
@@ -90,7 +90,7 @@ abstract class GoogleApiAsyncTask extends AsyncTask<String, Void, Throwable> {
|
||||
}
|
||||
}
|
||||
|
||||
private void processIOException(IOException e) {
|
||||
protected void processIOException(IOException e) {
|
||||
String message;
|
||||
if (noNetwork(e)) {
|
||||
message = this.context.getString(R.string.error_no_network);
|
||||
|
||||
@@ -98,6 +98,7 @@
|
||||
<string name="details_no_dependencies">нет зависимостей</string>
|
||||
<string name="details_contains_ads">Содержит рекламу</string>
|
||||
<string name="details_no_ads">Без рекламы</string>
|
||||
<string name="details_not_available_on_play_store">Этого приложения нет в Play Store</string>
|
||||
<string name="suffix_million">млн</string>
|
||||
<string name="suffix_billion">млрд</string>
|
||||
<string name="credentials_hint_email">e-mail</string>
|
||||
|
||||
@@ -97,6 +97,7 @@
|
||||
<string name="details_no_dependencies">nothing</string>
|
||||
<string name="details_contains_ads">Contains ads</string>
|
||||
<string name="details_no_ads">No ads</string>
|
||||
<string name="details_not_available_on_play_store">Not available on Play Store</string>
|
||||
<string name="suffix_million">mil</string>
|
||||
<string name="suffix_billion">bil</string>
|
||||
<string name="credentials_hint_email">e-mail here</string>
|
||||
|
||||
Reference in New Issue
Block a user