Skip to content

Commit afb1758

Browse files
authored
Merge branch 'develop' into issue/8932-dont-overwrite-local-changes
2 parents f6e8cc0 + 75f0b3a commit afb1758

File tree

221 files changed

+3471
-1759
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

221 files changed

+3471
-1759
lines changed

RELEASE-NOTES.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
* Add Importing from Giphy in Editor and Media Library
2-
* Adds support for .blog subdomains on new sites.
31
* First version of the refreshed stats project - all tabs and all the blocks are completely rewritten in new design
42
* Update the Notifications list layout for better readability
53
* Update the Me tab layout for tablets and large devices
64
* Use a more meaningful message for empty blocks in day/week/month/year Stats tabs
5+
* Fix the pages menu visibility issue after editing a page
6+
* Add privacy settings to enable removing of geolocation from the uploaded images
7+
* Fix the broken offline mode in Pages
8+
* Fix the error when editing a new page

WordPress/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ android {
4343

4444
defaultConfig {
4545
applicationId "org.wordpress.android"
46-
versionName "alpha-144"
47-
versionCode 658
46+
versionName "alpha-145"
47+
versionCode 660
4848
minSdkVersion 21
4949
targetSdkVersion 26
5050

@@ -177,8 +177,8 @@ dependencies {
177177
testImplementation 'junit:junit:4.12'
178178
testImplementation 'org.robolectric:robolectric:3.6.1'
179179
testImplementation 'org.robolectric:shadows-multidex:3.6.1'
180-
testImplementation 'org.mockito:mockito-core:2.20.1'
181-
testImplementation 'com.nhaarman:mockito-kotlin:1.6.0'
180+
testImplementation 'org.mockito:mockito-core:2.23.0'
181+
testImplementation 'com.nhaarman.mockitokotlin2:mockito-kotlin:2.1.0'
182182
testImplementation 'org.assertj:assertj-core:3.11.1'
183183

184184
androidTestImplementation 'com.google.dexmaker:dexmaker-mockito:1.0'
@@ -237,8 +237,8 @@ dependencies {
237237
debugImplementation 'com.facebook.stetho:stetho:1.5.0'
238238
debugImplementation 'com.facebook.stetho:stetho-okhttp3:1.5.0'
239239

240-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.26.1'
241-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:0.26.1'
240+
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlin_coroutines_version"
241+
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlin_coroutines_version"
242242

243243
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0-alpha'
244244
}

WordPress/metadata/PlayStoreStrings.po

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ msgstr ""
1313
msgctxt "release_note_115"
1414
msgid ""
1515
"11.5:\n"
16+
"* You can now register a .blog subdomain when you start a new site on the app!\n"
17+
"* Looking to add GIFs to your content? Giphy support is here (while a few rare bugs are gone).\n"
18+
"* Content you publish with the new WordPress Editor now works smoothly on the app.\n"
1619
msgstr ""
1720

1821
msgctxt "release_note_114"
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
You can now register a .blog subdomain when you start a new site on the app!
2-
Looking to add GIFs to your content? Giphy support is here (while a few rare bugs are gone).
3-
Content you publish with the new WordPress Editor now works smoothly on the app.
1+
* You can now register a .blog subdomain when you start a new site on the app!
2+
* Looking to add GIFs to your content? Giphy support is here (while a few rare bugs are gone).
3+
* Content you publish with the new WordPress Editor now works smoothly on the app.

WordPress/src/main/java/org/wordpress/android/WordPress.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,9 @@ public void wordPressComSignOut() {
485485
if (mCredentialsClient != null && mCredentialsClient.isConnected()) {
486486
Auth.CredentialsApi.disableAutoSignIn(mCredentialsClient);
487487
}
488+
489+
// Once fully logged out refresh the metadata so the user information doesn't persist for logged out events
490+
AnalyticsUtils.refreshMetadata(mAccountStore, mSiteStore);
488491
}
489492

490493
@SuppressWarnings("unused")

WordPress/src/main/java/org/wordpress/android/modules/ThreadModule.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ package org.wordpress.android.modules
22

33
import dagger.Module
44
import dagger.Provides
5-
import kotlinx.coroutines.experimental.CoroutineDispatcher
6-
import kotlinx.coroutines.experimental.CoroutineScope
7-
import kotlinx.coroutines.experimental.Dispatchers
8-
import kotlinx.coroutines.experimental.android.Main
5+
import kotlinx.coroutines.CoroutineDispatcher
6+
import kotlinx.coroutines.CoroutineScope
7+
import kotlinx.coroutines.Dispatchers
98
import javax.inject.Named
109

1110
const val UI_SCOPE = "UI_SCOPE"

WordPress/src/main/java/org/wordpress/android/networking/GravatarApi.java

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,21 @@ public void run() {
104104

105105
@Override
106106
public void onFailure(okhttp3.Call call, final IOException e) {
107-
Map<String, Object> properties = new HashMap<>();
108-
properties.put("network_exception_class", e != null ? e.getClass().getCanonicalName() : "null");
109-
properties.put("network_exception_message", e != null ? e.getMessage() : "null");
110-
AnalyticsTracker.track(AnalyticsTracker.Stat.ME_GRAVATAR_UPLOAD_EXCEPTION, properties);
111-
CrashlyticsUtils
112-
.logException(e, AppLog.T.API, "Network call failure trying to upload Gravatar!");
113-
AppLog.w(AppLog.T.API, "Network call failure trying to upload Gravatar!" + (e != null
114-
? e.getMessage() : "null"));
107+
String exceptionClass = e != null ? e.getClass().getCanonicalName() : "null";
108+
String exceptionMessage = e != null ? e.getMessage() : "null";
109+
110+
AppLog.w(AppLog.T.API, "Network call failure trying to upload Gravatar!"
111+
+ exceptionMessage);
112+
113+
// Don't track exceptions caused by poor internet connectivity
114+
if (!(e instanceof java.net.UnknownHostException)) {
115+
Map<String, Object> properties = new HashMap<>();
116+
properties.put("network_exception_class", exceptionClass);
117+
properties.put("network_exception_message", exceptionMessage);
118+
AnalyticsTracker.track(AnalyticsTracker.Stat.ME_GRAVATAR_UPLOAD_EXCEPTION, properties);
119+
CrashlyticsUtils
120+
.logException(e, AppLog.T.API, "Network call failure trying to upload Gravatar!");
121+
}
115122

116123
new Handler(Looper.getMainLooper()).post(new Runnable() {
117124
@Override

WordPress/src/main/java/org/wordpress/android/ui/activitylog/RewindProgressChecker.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package org.wordpress.android.ui.activitylog
22

3-
import kotlinx.coroutines.experimental.CoroutineScope
4-
import kotlinx.coroutines.experimental.NonCancellable.isActive
5-
import kotlinx.coroutines.experimental.delay
6-
import kotlinx.coroutines.experimental.withContext
3+
import kotlinx.coroutines.CoroutineScope
4+
import kotlinx.coroutines.delay
5+
import kotlinx.coroutines.isActive
6+
import kotlinx.coroutines.withContext
77
import org.wordpress.android.fluxc.action.ActivityLogAction.FETCH_REWIND_STATE
88
import org.wordpress.android.fluxc.model.SiteModel
99
import org.wordpress.android.fluxc.model.activity.RewindStatusModel.Rewind.Status.FAILED
@@ -42,7 +42,7 @@ class RewindProgressChecker
4242
delay(checkDelay)
4343
}
4444
var result: OnRewindStatusFetched? = null
45-
while (isActive) {
45+
while (coroutineContext.isActive) {
4646
val rewindStatusForSite = activityLogStore.getRewindStatusForSite(site)
4747
val rewind = rewindStatusForSite?.rewind
4848
if (rewind != null && rewind.restoreId == restoreId) {

WordPress/src/main/java/org/wordpress/android/ui/activitylog/RewindStatusService.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ package org.wordpress.android.ui.activitylog
22

33
import android.arch.lifecycle.LiveData
44
import android.arch.lifecycle.MutableLiveData
5-
import kotlinx.coroutines.experimental.CoroutineScope
6-
import kotlinx.coroutines.experimental.Job
7-
import kotlinx.coroutines.experimental.launch
5+
import kotlinx.coroutines.CoroutineScope
6+
import kotlinx.coroutines.Job
7+
import kotlinx.coroutines.launch
88
import org.wordpress.android.analytics.AnalyticsTracker
99
import org.wordpress.android.fluxc.model.SiteModel
1010
import org.wordpress.android.fluxc.model.activity.ActivityLogModel

WordPress/src/main/java/org/wordpress/android/ui/comments/CommentDetailFragment.java

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import android.app.AlertDialog;
55
import android.content.DialogInterface;
66
import android.content.Intent;
7+
import android.content.res.ColorStateList;
78
import android.os.Bundle;
89
import android.support.annotation.NonNull;
910
import android.support.annotation.Nullable;
@@ -1010,15 +1011,18 @@ private void performModerateAction() {
10101011
}
10111012

10121013
private void setModerateButtonForStatus(CommentStatus status) {
1014+
int color;
1015+
10131016
if (status == CommentStatus.APPROVED) {
1014-
mBtnModerateIcon.setImageResource(R.drawable.ic_checkmark_orange_jazzy_24dp);
1017+
color = ContextCompat.getColor(getActivity(), R.color.orange_jazzy);
10151018
mBtnModerateTextView.setText(R.string.comment_status_approved);
1016-
mBtnModerateTextView.setTextColor(ContextCompat.getColor(getActivity(), R.color.orange_jazzy));
10171019
} else {
1018-
mBtnModerateIcon.setImageResource(R.drawable.ic_checkmark_grey_min_24dp);
1020+
color = ContextCompat.getColor(getActivity(), R.color.grey_text_min);
10191021
mBtnModerateTextView.setText(R.string.mnu_comment_approve);
1020-
mBtnModerateTextView.setTextColor(ContextCompat.getColor(getActivity(), R.color.grey_text_min));
10211022
}
1023+
1024+
mBtnModerateIcon.setImageTintList(ColorStateList.valueOf(color));
1025+
mBtnModerateTextView.setTextColor(color);
10221026
}
10231027

10241028
/*
@@ -1136,19 +1140,24 @@ private void likeComment(boolean forceLike) {
11361140
}
11371141

11381142
private void toggleLikeButton(boolean isLiked) {
1143+
int color;
1144+
int drawable;
1145+
11391146
if (isLiked) {
1147+
color = ContextCompat.getColor(getActivity(), R.color.orange_jazzy);
1148+
drawable = R.drawable.ic_star_orange_jazzy_24dp;
11401149
mBtnLikeTextView.setText(getResources().getString(R.string.mnu_comment_liked));
1141-
mBtnLikeTextView.setTextColor(ContextCompat.getColor(getActivity(), R.color.orange_jazzy));
1142-
mBtnLikeIcon
1143-
.setImageDrawable(ContextCompat.getDrawable(getActivity(), R.drawable.ic_star_orange_jazzy_24dp));
11441150
mBtnLikeComment.setActivated(true);
11451151
} else {
1152+
color = ContextCompat.getColor(getActivity(), R.color.grey_text_min);
1153+
drawable = R.drawable.ic_star_outline_grey_min_24dp;
11461154
mBtnLikeTextView.setText(getResources().getString(R.string.reader_label_like));
1147-
mBtnLikeTextView.setTextColor(ContextCompat.getColor(getActivity(), R.color.grey_text_min));
1148-
mBtnLikeIcon.setImageDrawable(ContextCompat.getDrawable(getActivity(),
1149-
R.drawable.ic_star_outline_grey_min_24dp));
11501155
mBtnLikeComment.setActivated(false);
11511156
}
1157+
1158+
mBtnLikeIcon.setImageDrawable(ContextCompat.getDrawable(getActivity(), drawable));
1159+
mBtnLikeIcon.setImageTintList(ColorStateList.valueOf(color));
1160+
mBtnLikeTextView.setTextColor(color);
11521161
}
11531162

11541163
private void setProgressVisible(boolean visible) {

0 commit comments

Comments
 (0)