Skip to content
This repository has been archived by the owner on Aug 13, 2021. It is now read-only.

Commit

Permalink
Merge branch 'release/0.3.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasWanke committed Sep 19, 2019
2 parents 071fa79 + 82eb256 commit 0df9168
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,6 @@ abstract class MainFragment<VM : ViewModel>(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())
Expand Down
14 changes: 0 additions & 14 deletions app/src/main/java/org/schulcloud/mobile/utils/AndroidUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 0 additions & 6 deletions app/src/main/res/menu/fragment_main_top.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">

<item
android:id="@+id/base_action_share"
android:icon="@drawable/ic_share_black_24dp"
android:title="@string/general_action_share"
app:showAsAction="ifRoom" />

<item
android:id="@+id/base_action_refresh"
android:title="@string/general_action_refresh"
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/res/raw-en/changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,11 @@
<fix>Missing images in topics are now shown</fix>
</release>

<release
date="2019-09-19"
versionCode="3003"
versionName="Version 0.3.3">
<fix>Removed link sharing</fix>
</release>

</changelog>
7 changes: 7 additions & 0 deletions app/src/main/res/raw/changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,11 @@
<fix>Fehlende Bilder in Themen werden nun angezeigt</fix>
</release>

<release
date="19.09.2019"
versionCode="3003"
versionName="Version 0.3.3">
<fix>Teilen von Links wurde entfernt</fix>
</release>

</changelog>
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ buildscript {
targetSdkVersion = 28
compileSdkVersion = 28

versionName = '0.3.2'
versionCode = 3002
versionName = '0.3.3'
versionCode = 3003
}
repositories {
google()
Expand Down

0 comments on commit 0df9168

Please sign in to comment.