Skip to content

Commit

Permalink
Merge pull request #3 from wordpress-mobile/develop
Browse files Browse the repository at this point in the history
Rebase
  • Loading branch information
marco-altran committed Oct 9, 2020
2 parents 159bb62 + 4cb0340 commit 4f09d9d
Show file tree
Hide file tree
Showing 53 changed files with 1,110 additions and 374 deletions.
4 changes: 4 additions & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
* [***] Block Editor: Added expected double tap for focus behavior for text fields in accessibility mode [https://github.com/WordPress/gutenberg/pull/25384]
* [*] Improved My Site layout on devices with big screens. [https://github.com/wordpress-mobile/WordPress-Android/pull/13026]

15.8.1
-----
* [***] Login: Fixed an issue where some users would be prevented to login with a Jetpack site address.

15.8
-----
* [**] Reader: Now displaying preview images for more posts when no feature image is set.
Expand Down
8 changes: 4 additions & 4 deletions WordPress/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ android {
if (project.hasProperty("versionName")) {
versionName project.property("versionName")
} else {
versionName "alpha-248"
versionName "alpha-249"
}
versionCode 931
versionCode 934
minSdkVersion rootProject.minSdkVersion
targetSdkVersion rootProject.targetSdkVersion

Expand Down Expand Up @@ -92,9 +92,9 @@ android {
dimension "buildType"
// Only set the release version if one isn't provided
if (!project.hasProperty("versionName")) {
versionName "15.9-rc-1"
versionName "15.9-rc-2"
}
versionCode 930
versionCode 933
buildConfigField "boolean", "ME_ACTIVITY_AVAILABLE", "false"
buildConfigField "boolean", "TENOR_AVAILABLE", "false"
buildConfigField "long", "REMOTE_CONFIG_FETCH_INTERVAL", "3600"
Expand Down
17 changes: 8 additions & 9 deletions WordPress/metadata/PlayStoreStrings.po
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,20 @@ msgstr ""
"Project-Id-Version: Release Notes & Play Store Descriptions\n"

#. translators: Release notes for this version to be displayed in the Play Store. Limit to 500 characters including spaces and commas!
msgctxt "release_note_158"
msgctxt "release_note_159"
msgid ""
"15.8:\n"
"- Block editor enhancements: Added full-width and wide alignment support for Group, Cover, and Image blocks; added support for the Rounded style in the Image block; and resolved an issue where the toolbar behaved unexpectedly when adding a block.\n"
"- Reader update: Preview images are now displayed on posts when no featured image is set.\n"
"\n"
"15.9:\n"
"- Block editor: Edit unsupported blocks by enabling Jetpack SSO from the missing block alert. Use the link picker to add URLs to posts. Double-tap text fields in accessibility mode as expected.\n"
"- Improved My Site layout for large-screen devices.\n"
"\n"
msgstr ""

msgctxt "release_note_157"
msgctxt "release_note_158"
msgid ""
"15.7:\n"
"Improvements in the Reader: A new Discover tab you can tailor to your interests and an “(un)follow” button to the site and topic detail screens.\n"
"15.8:\n"
"- Block editor enhancements: Added full-width and wide alignment support for Group, Cover, and Image blocks; added support for the Rounded style in the Image block; and resolved an issue where the toolbar behaved unexpectedly when adding a block.\n"
"- Reader update: Preview images are now displayed on posts when no featured image is set.\n"
"\n"
"Block Editor enhancements: A new Pullquote block that lets you add emphasis to a chosen piece of text. Any changes made in menu sliders are now also immediately reflected in block settings.\n"
"\n"
msgstr ""

Expand Down
9 changes: 2 additions & 7 deletions WordPress/metadata/release_notes.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
* [*] Block Editor: Add message that mentions are unavailable when device is offline. [https://github.com/wordpress-mobile/WordPress-Android/pull/12968]
* [**] Block Editor: Increase tap-target of primary action on unsupported blocks. [https://github.com/wordpress-mobile/gutenberg-mobile/pull/2608]
* [***] Block Editor: On Jetpack connected sites, Unsupported Block Editor can be enabled via enabling Jetpack SSO setting directly from within the missing block alert. [https://github.com/wordpress-mobile/gutenberg-mobile/pull/2610]
* [***] Block Editor: Add support for selecting user's post when configuring the link [https://github.com/wordpress-mobile/gutenberg-mobile/pull/2484]
* [**] Block Editor: Fix for a crash that can occur when long pressing selected images [https://github.com/wordpress-mobile/AztecEditor-Android/pull/924]
* [***] Block Editor: Added expected double tap for focus behavior for text fields in accessibility mode [https://github.com/WordPress/gutenberg/pull/25384]
* [*] Improved My Site layout on devices with big screens. [https://github.com/wordpress-mobile/WordPress-Android/pull/13026]
- Block editor: Edit unsupported blocks by enabling Jetpack SSO from the missing block alert. Use the link picker to add URLs to posts. Double-tap text fields in accessibility mode as expected.
- Improved My Site layout for large-screen devices.

Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,9 @@ object ReaderDiscoverCardsTable {
db.execSQL("DROP TABLE IF EXISTS tbl_discover_cards")
}

fun reset() {
reset(getWritableDb())
}

fun reset(db: SQLiteDatabase) {
AppLog.i(AppLog.T.READER, "resetting ReaderDiscoverCardsTable")
dropTables(db)
createTable(db)
fun clear() {
AppLog.i(AppLog.T.READER, "clearing ReaderDiscoverCardsTable")
getWritableDb().delete(DISCOVER_CARDS_TABLE, null, null)
}

private fun getReadableDb(): SQLiteDatabase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,10 @@ private static Intent createShowPhotoPickerIntent(Context context,
return intent;
}

/**
* Use {@link org.wordpress.android.ui.photopicker.MediaPickerLauncher::showStockMediaPickerForResult} instead
*/
@Deprecated
public static void showStockMediaPickerForResult(Activity activity,
@NonNull SiteModel site,
int requestCode) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1013,8 +1013,8 @@ private void doAddMediaItemClicked(@NonNull AddMenuItem item) {
mMediaPickerLauncher.showFilePicker(this);
break;
case ITEM_CHOOSE_STOCK_MEDIA:
ActivityLauncher.showStockMediaPickerForResult(this,
mSite, RequestCodes.STOCK_MEDIA_PICKER_MULTI_SELECT);
mMediaPickerLauncher.showStockMediaPickerForResult(this,
mSite, RequestCodes.STOCK_MEDIA_PICKER_MULTI_SELECT, true);
break;
case ITEM_CHOOSE_GIF:
ActivityLauncher.showGifPickerForResult(this, mSite, RequestCodes.GIF_PICKER_MULTI_SELECT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import android.net.Uri
import android.os.Parcelable
import kotlinx.android.parcel.Parcelize
import org.wordpress.android.util.UriWrapper
import java.lang.IllegalArgumentException

data class MediaItem(
val identifier: Identifier,
Expand All @@ -17,6 +16,7 @@ data class MediaItem(
sealed class Identifier {
data class LocalUri(val value: UriWrapper) : Identifier()
data class RemoteId(val value: Long) : Identifier()
data class StockMediaIdentifier(val url: String?, val name: String?, val title: String?) : Identifier()

fun toParcel() = Parcel((this as? LocalUri)?.value?.uri, (this as? RemoteId)?.value)

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import android.net.Uri
import android.os.Bundle
import android.text.TextUtils
import android.view.MenuItem
import android.widget.Toast
import androidx.fragment.app.FragmentTransaction
import kotlinx.android.synthetic.main.toolbar_main.*
import org.wordpress.android.R
Expand Down Expand Up @@ -46,10 +45,6 @@ import org.wordpress.android.ui.photopicker.MediaPickerConstants.EXTRA_MEDIA_URI
import org.wordpress.android.ui.photopicker.MediaPickerConstants.LOCAL_POST_ID
import org.wordpress.android.ui.posts.EMPTY_LOCAL_POST_ID
import org.wordpress.android.ui.posts.FeaturedImageHelper
import org.wordpress.android.ui.posts.FeaturedImageHelper.EnqueueFeaturedImageResult.FILE_NOT_FOUND
import org.wordpress.android.ui.posts.FeaturedImageHelper.EnqueueFeaturedImageResult.INVALID_POST_ID
import org.wordpress.android.ui.posts.FeaturedImageHelper.EnqueueFeaturedImageResult.SUCCESS
import org.wordpress.android.ui.posts.FeaturedImageHelper.TrackableEvent.IMAGE_PICKED
import org.wordpress.android.ui.posts.editor.ImageEditorTracker
import org.wordpress.android.ui.utils.UiHelpers
import org.wordpress.android.util.AppLog
Expand Down Expand Up @@ -235,39 +230,11 @@ class MediaPickerActivity : LocaleAwareActivity(), MediaPickerListener {
) {
// if user chose a featured image, we need to upload it and return the uploaded media object
if (mediaPickerSetup.queueResults) {
val mediaUri = mediaUris[0]
val mimeType = contentResolver.getType(mediaUri)
featuredImageHelper.trackFeaturedImageEvent(
IMAGE_PICKED,
localPostId
)
WPMediaUtils.fetchMediaAndDoNext(
this, mediaUri
) { uri ->
val queueImageResult = featuredImageHelper
.queueFeaturedImageForUpload(
localPostId, site!!, uri,
mimeType
)
when (queueImageResult) {
FILE_NOT_FOUND -> Toast.makeText(
applicationContext,
R.string.file_not_found, Toast.LENGTH_SHORT
)
.show()
INVALID_POST_ID -> Toast.makeText(
applicationContext,
R.string.error_generic, Toast.LENGTH_SHORT
)
.show()
SUCCESS -> {
}
}
val intent = Intent()
.putExtra(EXTRA_MEDIA_QUEUED, true)
setResult(Activity.RESULT_OK, intent)
finish()
}
val intent = Intent()
.putExtra(EXTRA_MEDIA_QUEUED, true)
.putExtra(EXTRA_MEDIA_URIS, convertUrisListToStringArray(mediaUris))
setResult(Activity.RESULT_OK, intent)
finish()
} else {
val intent = Intent()
.putExtra(EXTRA_MEDIA_URIS, convertUrisListToStringArray(mediaUris))
Expand Down
Loading

0 comments on commit 4f09d9d

Please sign in to comment.