Skip to content

Commit

Permalink
Merge branch 'feature/notifications_refresh_p1' into issue/20024-like…
Browse files Browse the repository at this point in the history
…-inline-action
  • Loading branch information
Jarvis Lin committed Feb 2, 2024
2 parents 14ad09a + 8ce1152 commit 25fd354
Show file tree
Hide file tree
Showing 45 changed files with 1,249 additions and 747 deletions.
3 changes: 2 additions & 1 deletion RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

24.2
-----

* [**] Fix editor crash occurring on large posts [https://github.com/wordpress-mobile/WordPress-Android/pull/20046]
* [*] [Jetpack-only] Site Monitoring: Add Metrics, PHP Logs, and Web Server Logs under Site Monitoring [https://github.com/wordpress-mobile/WordPress-Android/issues/20067]

24.1
-----
Expand Down
14 changes: 10 additions & 4 deletions WordPress/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -387,10 +387,6 @@ dependencies {
}
implementation "org.wordpress:persistentedittext:$wordPressPersistentEditTextVersion"

// To enable Stetho, a debug bridge that enables the Chrome Developer Tools for debug purposes.
debugImplementation "com.facebook.stetho:stetho:$stethoVersion"
debugImplementation "com.facebook.stetho:stetho-okhttp3:$stethoVersion"

implementation "androidx.arch.core:core-common:$androidxArchCoreVersion"
implementation "androidx.arch.core:core-runtime:$androidxArchCoreVersion"
implementation "com.google.code.gson:gson:$googleGsonVersion"
Expand Down Expand Up @@ -558,6 +554,16 @@ dependencies {
// - Jetpack Compose - UI Tests
androidTestImplementation "androidx.compose.ui:ui-test-junit4"
implementation "androidx.compose.material3:material3:$androidxComposeMaterial3Version"

// - Flipper
debugImplementation ("com.facebook.flipper:flipper:$flipperVersion") {
exclude group:'org.jetbrains.kotlinx', module:'kotlinx-serialization-json-jvm'
}
debugImplementation "com.facebook.soloader:soloader:$soLoaderVersion"
debugImplementation ("com.facebook.flipper:flipper-network-plugin:$flipperVersion"){
exclude group:'org.jetbrains.kotlinx', module:'kotlinx-serialization-json-jvm'
}
releaseImplementation "com.facebook.flipper:flipper-noop:$flipperVersion"
}

configurations.all {
Expand Down
2 changes: 2 additions & 0 deletions WordPress/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,7 @@
android:name=".ui.debug.preferences.DebugSharedPreferenceFlagsActivity"
android:label="@string/debug_settings_debug_flags_screen"
android:theme="@style/WordPress.NoActionBar" />
<activity android:name="com.facebook.flipper.android.diagnostics.FlipperDiagnosticActivity"
android:exported="true"/>
</application>
</manifest>
22 changes: 19 additions & 3 deletions WordPress/src/debug/java/org/wordpress/android/WordPressDebug.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@

import android.os.StrictMode;

import com.facebook.stetho.Stetho;
import com.facebook.flipper.android.AndroidFlipperClient;
import com.facebook.flipper.android.utils.FlipperUtils;
import com.facebook.flipper.core.FlipperClient;
import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
import com.facebook.flipper.plugins.inspector.DescriptorMapping;
import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
import com.facebook.soloader.SoLoader;

import org.wordpress.android.util.AppLog;
import org.wordpress.android.util.AppLog.T;
Expand All @@ -11,14 +18,23 @@

@HiltAndroidApp
public class WordPressDebug extends WordPressApp {
public static final NetworkFlipperPlugin NETWORK_FLIPPER_PLUGIN = new NetworkFlipperPlugin();
@Override
public void onCreate() {
super.onCreate();

// enableStrictMode()

// Init Stetho
Stetho.initializeWithDefaults(this);
// init Flipper
SoLoader.init(this, false);

if (BuildConfig.DEBUG && FlipperUtils.shouldEnableFlipper(this)) {
final FlipperClient client = AndroidFlipperClient.getInstance(this);
client.addPlugin(new InspectorFlipperPlugin(this, DescriptorMapping.withDefaults()));
client.addPlugin(NETWORK_FLIPPER_PLUGIN);
client.addPlugin(new DatabasesFlipperPlugin(this));
client.start();
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package org.wordpress.android.modules;

import com.facebook.stetho.okhttp3.StethoInterceptor;
import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;

import org.wordpress.android.WordPressDebug;

import javax.inject.Named;

Expand All @@ -11,11 +13,12 @@
import dagger.multibindings.IntoSet;
import okhttp3.Interceptor;


@InstallIn(SingletonComponent.class)
@Module
public class InterceptorModule {
@Provides @IntoSet @Named("network-interceptors")
public Interceptor provideStethoInterceptor() {
return new StethoInterceptor();
public Interceptor provideFlipperInterceptor() {
return new FlipperOkhttpInterceptor(WordPressDebug.NETWORK_FLIPPER_PLUGIN);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class PersonalizationActivity : AppCompatActivity() {
contentColor = MaterialTheme.colors.onSurface,
) {
tabs.forEachIndexed { index, title ->
Tab(text = { Text(stringResource(id = title)) },
Tab(text = { Text(stringResource(id = title).uppercase()) },
selected = tabIndex == index,
onClick = { tabIndex = index }
)
Expand Down

This file was deleted.

Loading

0 comments on commit 25fd354

Please sign in to comment.