Loading app/src/main/java/foundation/e/apps/data/NetworkHandler.kt +0 −2 Original line number Diff line number Diff line Loading @@ -46,8 +46,6 @@ suspend fun <T> handleNetworkResult(call: suspend () -> T): ResultSupreme<T> { handleSocketTimeoutException(e) } catch (e: GplayHttpRequestException) { resultSupremeGplayHttpRequestException(e) } catch (e: IllegalStateException) { throw e } catch (e: Exception) { handleOthersException(e) } Loading app/src/main/java/foundation/e/apps/ui/application/ApplicationViewModel.kt +13 −6 Original line number Diff line number Diff line Loading @@ -137,16 +137,23 @@ class ApplicationViewModel @Inject constructor( packageName, origin ) result.first.isPurchased = isPurchased val app = result.first val status = result.second app.isPurchased = isPurchased applicationLiveData.postValue(result) updateShareVisibilityState(result.first.shareUri.toString()) updateAppContentRatingState(packageName, result.first.contentRating) updateShareVisibilityState(app.shareUri.toString()) updateAppContentRatingState(packageName, app.contentRating) if (status != ResultStatus.OK) { EventBus.invokeEvent( AppEvent.InvalidAuthEvent(AuthObject.GPlayAuth::class.java.simpleName) ) } } catch (e: InternalException.AppNotFound) { _errorMessageLiveData.postValue(R.string.app_not_found) } catch (exception: IllegalStateException) { exception.printStackTrace() EventBus.invokeEvent(AppEvent.InvalidAuthEvent(AuthObject.GPlayAuth::class.java.simpleName)) } catch (e: Exception) { _errorMessageLiveData.postValue(R.string.unknown_error) } Loading Loading
app/src/main/java/foundation/e/apps/data/NetworkHandler.kt +0 −2 Original line number Diff line number Diff line Loading @@ -46,8 +46,6 @@ suspend fun <T> handleNetworkResult(call: suspend () -> T): ResultSupreme<T> { handleSocketTimeoutException(e) } catch (e: GplayHttpRequestException) { resultSupremeGplayHttpRequestException(e) } catch (e: IllegalStateException) { throw e } catch (e: Exception) { handleOthersException(e) } Loading
app/src/main/java/foundation/e/apps/ui/application/ApplicationViewModel.kt +13 −6 Original line number Diff line number Diff line Loading @@ -137,16 +137,23 @@ class ApplicationViewModel @Inject constructor( packageName, origin ) result.first.isPurchased = isPurchased val app = result.first val status = result.second app.isPurchased = isPurchased applicationLiveData.postValue(result) updateShareVisibilityState(result.first.shareUri.toString()) updateAppContentRatingState(packageName, result.first.contentRating) updateShareVisibilityState(app.shareUri.toString()) updateAppContentRatingState(packageName, app.contentRating) if (status != ResultStatus.OK) { EventBus.invokeEvent( AppEvent.InvalidAuthEvent(AuthObject.GPlayAuth::class.java.simpleName) ) } } catch (e: InternalException.AppNotFound) { _errorMessageLiveData.postValue(R.string.app_not_found) } catch (exception: IllegalStateException) { exception.printStackTrace() EventBus.invokeEvent(AppEvent.InvalidAuthEvent(AuthObject.GPlayAuth::class.java.simpleName)) } catch (e: Exception) { _errorMessageLiveData.postValue(R.string.unknown_error) } Loading