mirror of
				https://codeberg.org/tom79/Fedilab.git
				synced 2025-10-20 11:20:16 +03:00 
			
		
		
		
	avoid a crash with old peertube instances
This commit is contained in:
		
							parent
							
								
									9683fee1e6
								
							
						
					
					
						commit
						3f1af73b0e
					
				
					 3 changed files with 7 additions and 6 deletions
				
			
		|  | @ -33,6 +33,8 @@ import android.webkit.URLUtil; | |||
| import androidx.documentfile.provider.DocumentFile; | ||||
| import androidx.preference.PreferenceManager; | ||||
| 
 | ||||
| import com.google.gson.JsonSyntaxException; | ||||
| 
 | ||||
| import org.jetbrains.annotations.NotNull; | ||||
| import org.json.JSONException; | ||||
| import org.json.JSONObject; | ||||
|  | @ -1188,9 +1190,9 @@ public class RetrofitPeertubeAPI { | |||
|                 } | ||||
|                 throw error; | ||||
|             } | ||||
|         } catch (IOException e) { | ||||
|         } catch (IOException | JsonSyntaxException e) { | ||||
|             Error error = new Error(); | ||||
|             error.setError(_context.getString(R.string.toast_error)); | ||||
|             error.setError(_context.getString(R.string.toast_error_peertube_not_supported)); | ||||
|             apiResponse.setError(error); | ||||
|             e.printStackTrace(); | ||||
|         } | ||||
|  |  | |||
|  | @ -1,4 +0,0 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <resources> | ||||
|     <string name="compose_shortcut_short_label1">Compose</string> | ||||
| </resources> | ||||
|  | @ -2228,4 +2228,7 @@ | |||
|     <string name="action_change_subscribed_language">Change subscribed languages</string> | ||||
|     <string name="filter_languages">Filter languages</string> | ||||
|     <string name="translate_in">Translate in</string> | ||||
| 
 | ||||
|     <string name="compose_shortcut_short_label1">Compose</string> | ||||
|     <string name="toast_error_peertube_not_supported">Your Peertube is too old and cannot be supported by the app.</string> | ||||
| </resources> | ||||
		Loading…
	
		Reference in a new issue