mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-30 22:34:02 +01:00 
			
		
		
		
	Fix#5084: Tapping on GitHub icon opens app when installed (#5171)
This commit is contained in:
		
							parent
							
								
									b048e099c0
								
							
						
					
					
						commit
						ce1a0b88c3
					
				
					 2 changed files with 9 additions and 1 deletions
				
			
		|  | @ -101,7 +101,14 @@ public class AboutActivity extends BaseActivity { | |||
|     } | ||||
| 
 | ||||
|     public void launchGithub(View view) { | ||||
|         Utils.handleWebUrl(this, Uri.parse(Urls.GITHUB_REPO_URL)); | ||||
|         Intent intent; | ||||
|         try { | ||||
|             intent = new Intent(Intent.ACTION_VIEW, Uri.parse(Urls.GITHUB_REPO_URL)); | ||||
|             intent.setPackage(Urls.GITHUB_PACKAGE_NAME); | ||||
|             startActivity(intent); | ||||
|         } catch (Exception e) { | ||||
|             Utils.handleWebUrl(this, Uri.parse(Urls.GITHUB_REPO_URL)); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     public void launchWebsite(View view) { | ||||
|  |  | |||
|  | @ -3,6 +3,7 @@ package fr.free.nrw.commons | |||
| internal object Urls { | ||||
|     const val NEW_ISSUE_URL = "https://github.com/commons-app/apps-android-commons/issues" | ||||
|     const val GITHUB_REPO_URL = "https://github.com/commons-app/apps-android-commons" | ||||
|     const val GITHUB_PACKAGE_NAME = "com.github.android" | ||||
|     const val WEBSITE_URL = "https://commons-app.github.io" | ||||
|     const val CREDITS_URL = "https://github.com/commons-app/apps-android-commons/blob/master/CREDITS" | ||||
|     const val USER_GUIDE_URL = "https://commons-app.github.io/docs.html" | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Eduardo Isai Martínez Méndez
						Eduardo Isai Martínez Méndez