From e5668c481d4f6735dc54ae0e5789c37cf8278f32 Mon Sep 17 00:00:00 2001 From: Jonas Wanke Date: Thu, 19 Sep 2019 11:00:28 +0200 Subject: [PATCH 1/2] fix(main): remove link sharing --- .../mobile/controllers/base/BaseActivity.kt | 1 - .../mobile/controllers/main/MainFragment.kt | 6 ------ .../org/schulcloud/mobile/utils/AndroidUtils.kt | 14 -------------- app/src/main/res/menu/fragment_main_top.xml | 6 ------ 4 files changed, 27 deletions(-) diff --git a/app/src/main/java/org/schulcloud/mobile/controllers/base/BaseActivity.kt b/app/src/main/java/org/schulcloud/mobile/controllers/base/BaseActivity.kt index 611a993e..de209dd4 100644 --- a/app/src/main/java/org/schulcloud/mobile/controllers/base/BaseActivity.kt +++ b/app/src/main/java/org/schulcloud/mobile/controllers/base/BaseActivity.kt @@ -78,7 +78,6 @@ abstract class BaseActivity : AppCompatActivity(), CoroutineScope { // region Activity override fun onOptionsItemSelected(item: MenuItem): Boolean { when (item.itemId) { - R.id.base_action_share -> shareLink(url.asUri(), supportActionBar?.title) R.id.base_action_refresh -> performRefresh() // TODO: Remove when deep linking is readded R.id.base_action_openInBrowser -> openUrl(url.asUri()) diff --git a/app/src/main/java/org/schulcloud/mobile/controllers/main/MainFragment.kt b/app/src/main/java/org/schulcloud/mobile/controllers/main/MainFragment.kt index b6754bcf..cf57a4f7 100644 --- a/app/src/main/java/org/schulcloud/mobile/controllers/main/MainFragment.kt +++ b/app/src/main/java/org/schulcloud/mobile/controllers/main/MainFragment.kt @@ -95,12 +95,6 @@ abstract class MainFragment(refreshableImpl: RefreshableImpl = R override fun onOptionsItemSelected(item: MenuItem): Boolean { when (item.itemId) { - R.id.base_action_share -> { - var link = url ?: return true - if (link.startsWith('/')) - link = combinePath(HOST, link) - context?.shareLink(link.asUri(), mainViewModel.config.value?.title) - } R.id.base_action_refresh -> performRefresh() // TODO: Remove when deep linking is readded R.id.base_action_openInBrowser -> context?.openUrl(url.asUri()) diff --git a/app/src/main/java/org/schulcloud/mobile/utils/AndroidUtils.kt b/app/src/main/java/org/schulcloud/mobile/utils/AndroidUtils.kt index e82f015b..5f76a9b5 100644 --- a/app/src/main/java/org/schulcloud/mobile/utils/AndroidUtils.kt +++ b/app/src/main/java/org/schulcloud/mobile/utils/AndroidUtils.kt @@ -42,20 +42,6 @@ fun Drawable.asBitmap(): Bitmap { return bitmap } -fun Context.shareLink(uri: Uri, titleContent: CharSequence? = null) { - val intent = Intent(Intent.ACTION_SEND).apply { - type = MIME_TEXT_PLAIN - putExtra(Intent.EXTRA_SUBJECT, - if (titleContent != null) - getString(R.string.share_subject_format, - getString(R.string.brand_name), - titleContent) - else getString(R.string.brand_name)) - putExtra(Intent.EXTRA_TEXT, uri.toString()) - } - startActivity(Intent.createChooser(intent, getString(R.string.share_title))) -} - fun isLtr() = TextUtilsCompat.getLayoutDirectionFromLocale(Locale.getDefault()) == ViewCompat.LAYOUT_DIRECTION_LTR diff --git a/app/src/main/res/menu/fragment_main_top.xml b/app/src/main/res/menu/fragment_main_top.xml index 70ecd74f..aa7692be 100644 --- a/app/src/main/res/menu/fragment_main_top.xml +++ b/app/src/main/res/menu/fragment_main_top.xml @@ -3,12 +3,6 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> - - Date: Thu, 19 Sep 2019 13:21:38 +0200 Subject: [PATCH 2/2] rel: bump version --- app/src/main/res/raw-en/changelog.xml | 7 +++++++ app/src/main/res/raw/changelog.xml | 7 +++++++ build.gradle | 4 ++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/raw-en/changelog.xml b/app/src/main/res/raw-en/changelog.xml index 2909a51b..8114c7ce 100644 --- a/app/src/main/res/raw-en/changelog.xml +++ b/app/src/main/res/raw-en/changelog.xml @@ -29,4 +29,11 @@ Missing images in topics are now shown + + Removed link sharing + + diff --git a/app/src/main/res/raw/changelog.xml b/app/src/main/res/raw/changelog.xml index 3b72e718..913a650e 100644 --- a/app/src/main/res/raw/changelog.xml +++ b/app/src/main/res/raw/changelog.xml @@ -31,4 +31,11 @@ Fehlende Bilder in Themen werden nun angezeigt + + Teilen von Links wurde entfernt + + diff --git a/build.gradle b/build.gradle index 1e720348..f1186e9d 100644 --- a/build.gradle +++ b/build.gradle @@ -6,8 +6,8 @@ buildscript { targetSdkVersion = 28 compileSdkVersion = 28 - versionName = '0.3.2' - versionCode = 3002 + versionName = '0.3.3' + versionCode = 3003 } repositories { google()