Commit 7cf080ac authored by peturbg's avatar peturbg
Browse files

Merge remote-tracking branch 'develop/develop' into jordibgzashtita

parents f986a345 90a42c6e
Loading
Loading
Loading
Loading
Loading
+26 −30
Original line number Diff line number Diff line
@@ -13,8 +13,8 @@ android {
    defaultConfig {
        minSdk 21
        targetSdk 34
        versionCode 515
        versionName "3.28.2"
        versionCode 518
        versionName "3.29.2"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    flavorDimensions "default"
@@ -61,7 +61,6 @@ android {
    }
    sourceSets {
        playstore {
            manifest.srcFile "src/playstore/AndroidManifest.xml"
            java.srcDirs = ['src/main/java', 'src/playstore/java']
            res.srcDirs = ['src/main/res', 'src/playstore/res']
        }
@@ -101,6 +100,7 @@ android {
        abortOnError false
        checkReleaseBuilds false
    }
    buildToolsVersion '35.0.0'
}
allprojects {
    repositories {
@@ -109,14 +109,17 @@ allprojects {
    }
}
dependencies {
    implementation 'org.unifiedpush.android:connector:3.0.4'

    implementation 'androidx.appcompat:appcompat:1.6.1'
    playstoreImplementation('org.unifiedpush.android:embedded-fcm-distributor:3.0.0')

    implementation 'com.google.android.material:material:1.10.0'
    implementation 'androidx.appcompat:appcompat:1.7.0'

    implementation 'com.google.android.material:material:1.12.0'

    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation "com.google.code.gson:gson:2.9.1"

    implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
    implementation "com.google.code.gson:gson:2.10.1"
    implementation 'com.squareup.retrofit2:retrofit:2.9.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
    implementation 'com.squareup.retrofit2:converter-simplexml:2.9.0'
@@ -132,7 +135,7 @@ dependencies {
        transitive = false
    }

    implementation "org.jsoup:jsoup:1.15.1"
    implementation "org.jsoup:jsoup:1.18.1"
    implementation 'com.github.mergehez:ArgPlayer:v3.1'

    implementation project(':autoimageslider')
@@ -155,7 +158,7 @@ dependencies {
    implementation "androidx.media3:media3-session:1.2.1"


    implementation "androidx.viewpager2:viewpager2:1.0.0"
    implementation "androidx.viewpager2:viewpager2:1.1.0"
    implementation 'com.github.piasy:rxandroidaudio:1.7.0'
    implementation 'com.github.piasy:AudioProcessor:1.7.0'
    implementation "androidx.work:work-runtime:2.9.0"
@@ -165,31 +168,24 @@ dependencies {
    implementation "ch.acra:acra-limiter:5.11.3"
    implementation "ch.acra:acra-dialog:5.11.3"
    implementation "com.madgag.spongycastle:bctls-jdk15on:1.58.0.0"
    implementation 'com.github.UnifiedPush:android-connector:2.2.0'
   // implementation 'com.github.UnifiedPush:android-foss_embedded_fcm_distributor:1.0.0-beta1'
    playstoreImplementation('com.github.UnifiedPush:android-embedded_fcm_distributor:2.2.0') {
        exclude group: 'com.google.firebase', module: 'firebase-core'
        exclude group: 'com.google.firebase', module: 'firebase-analytics'
        exclude group: 'com.google.firebase', module: 'firebase-measurement-connector'
    }
    implementation 'com.burhanrashid52:photoeditor:1.5.1'
    implementation 'androidx.multidex:multidex:2.0.1'
    implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
    implementation 'androidx.lifecycle:lifecycle-livedata:2.6.2'
    implementation 'androidx.lifecycle:lifecycle-viewmodel:2.6.2'
    implementation 'androidx.navigation:navigation-fragment:2.7.5'
    implementation 'androidx.navigation:navigation-ui:2.7.5'
    implementation 'androidx.lifecycle:lifecycle-livedata:2.8.7'
    implementation 'androidx.lifecycle:lifecycle-viewmodel:2.8.7'
    implementation 'androidx.navigation:navigation-fragment:2.8.7'
    implementation 'androidx.navigation:navigation-ui:2.8.7'
    testImplementation 'junit:junit:'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
    androidTestImplementation 'androidx.test.ext:junit:1.2.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
    // debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.8.1'
    implementation 'com.r0adkll:slidableactivity:2.1.0'
    coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
    coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.4'

    implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
    implementation "androidx.fragment:fragment:1.6.2"
    implementation 'androidx.vectordrawable:vectordrawable:1.2.0'
    implementation "androidx.fragment:fragment:1.8.6"
    implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
    implementation 'androidx.browser:browser:1.7.0'
    implementation 'androidx.browser:browser:1.8.0'
    implementation 'androidx.documentfile:documentfile:1.0.1'
    implementation 'com.github.amoskorir:avatarimagegenerator:1.5.0'

@@ -211,10 +207,10 @@ dependencies {
    //************ CAST **************///

    //---> Google libs (google_full)
    playstoreImplementation "com.google.android.gms:play-services-cast-tv:21.0.1"
    playstoreImplementation "com.google.android.gms:play-services-cast:21.4.0"
    playstoreImplementation "androidx.mediarouter:mediarouter:1.6.0"
    playstoreImplementation 'com.google.android.gms:play-services-cast-framework:21.4.0'
    playstoreImplementation "com.google.android.gms:play-services-cast-tv:21.1.1"
    playstoreImplementation "com.google.android.gms:play-services-cast:22.0.0"
    playstoreImplementation "androidx.mediarouter:mediarouter:1.7.0"
    playstoreImplementation 'com.google.android.gms:play-services-cast-framework:22.0.0'


    //----> Other flavors
+15 −15
Original line number Diff line number Diff line
@@ -52,21 +52,21 @@ public abstract class PeertubeBaseMainActivity extends BaseActivity implements C
    public static List<ChromeCast> chromeCasts;
    public static ChromeCast chromeCast;
    public static boolean chromecastActivated = false;
    protected ActivityMainPeertubeBinding binding;
    protected ActivityMainPeertubeBinding parentBinding;
    private BroadcastReceiver manage_chromecast;
    private VideoData.Video castedTube;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding = ActivityMainPeertubeBinding.inflate(getLayoutInflater());
        View view = binding.getRoot();
        parentBinding = ActivityMainPeertubeBinding.inflate(getLayoutInflater());
        View view = parentBinding.getRoot();
        setContentView(view);
        ChromeCastsListener chromeCastsListener = this;
        ChromeCasts.registerListener(chromeCastsListener);


        binding.castClose.setOnClickListener(v -> {
        parentBinding.castClose.setOnClickListener(v -> {
            Intent intentBC = new Intent(Helper.RECEIVE_CAST_SETTINGS);
            Bundle b = new Bundle();
            b.putInt("displayed", 0);
@@ -75,12 +75,12 @@ public abstract class PeertubeBaseMainActivity extends BaseActivity implements C
            sendBroadcast(intentBC);
        });

        binding.castTogglePlay.setOnClickListener(v -> {
        parentBinding.castTogglePlay.setOnClickListener(v -> {
            if (chromeCast != null) {
                new Thread(() -> {
                    try {
                        Handler mainHandler = new Handler(Looper.getMainLooper());
                        Runnable myRunnable = () -> binding.castTogglePlay.setVisibility(View.GONE);
                        Runnable myRunnable = () -> parentBinding.castTogglePlay.setVisibility(View.GONE);
                        mainHandler.post(myRunnable);
                        int icon = -1;
                        if (chromeCast.getMediaStatus().playerState == MediaStatus.PlayerState.PLAYING) {
@@ -92,10 +92,10 @@ public abstract class PeertubeBaseMainActivity extends BaseActivity implements C
                        }
                        if (icon != -1) {
                            int finalIcon = icon;
                            myRunnable = () -> binding.castTogglePlay.setImageResource(finalIcon);
                            myRunnable = () -> parentBinding.castTogglePlay.setImageResource(finalIcon);
                            mainHandler.post(myRunnable);
                        }
                        myRunnable = () -> binding.castTogglePlay.setVisibility(View.VISIBLE);
                        myRunnable = () -> parentBinding.castTogglePlay.setVisibility(View.VISIBLE);
                        mainHandler.post(myRunnable);
                    } catch (IOException e) {
                        e.printStackTrace();
@@ -131,14 +131,14 @@ public abstract class PeertubeBaseMainActivity extends BaseActivity implements C
                if (displayed == 1) {
                    chromecastActivated = true;
                    if (castedTube != null) {
                        binding.castInfo.setVisibility(View.VISIBLE);
                        Helper.loadGiF(PeertubeBaseMainActivity.this, castedTube.getThumbnailPath(), binding.castView);
                        binding.castTitle.setText(castedTube.getTitle());
                        binding.castDescription.setText(castedTube.getDescription());
                        parentBinding.castInfo.setVisibility(View.VISIBLE);
                        Helper.loadGiF(PeertubeBaseMainActivity.this, castedTube.getThumbnailPath(), parentBinding.castView);
                        parentBinding.castTitle.setText(castedTube.getTitle());
                        parentBinding.castDescription.setText(castedTube.getDescription());
                    }
                } else if (displayed == 0) {
                    chromecastActivated = false;
                    binding.castInfo.setVisibility(View.GONE);
                    parentBinding.castInfo.setVisibility(View.GONE);
                    new Thread(() -> {
                        try {
                            if (chromeCast != null) {
@@ -173,8 +173,8 @@ public abstract class PeertubeBaseMainActivity extends BaseActivity implements C
        }
        try {
            if (chromeCast.isAppRunning(Helper.CAST_ID) && chromeCast.getMediaStatus() != null && chromeCast.getMediaStatus().playerState != null) {
                if (binding.castInfo.getVisibility() == View.GONE) {
                    binding.castInfo.setVisibility(View.VISIBLE);
                if (parentBinding.castInfo.getVisibility() == View.GONE) {
                    parentBinding.castInfo.setVisibility(View.VISIBLE);
                }
            }
        } catch (IOException e) {
+4 −10
Original line number Diff line number Diff line
@@ -467,18 +467,12 @@
            </intent-filter>
        </receiver>

        <receiver
            android:name=".mastodon.services.CustomReceiver"
            android:enabled="true"
            android:exported="true">
        <service android:name=".mastodon.services.PushServiceImpl"
            android:exported="false">
            <intent-filter>
                <action android:name="org.unifiedpush.android.connector.MESSAGE" />
                <action android:name="org.unifiedpush.android.connector.UNREGISTERED" />
                <action android:name="org.unifiedpush.android.connector.NEW_ENDPOINT" />
                <action android:name="org.unifiedpush.android.connector.REGISTRATION_FAILED" />
                <action android:name="org.unifiedpush.android.connector.REGISTRATION_REFUSED" />
                <action android:name="org.unifiedpush.android.connector.PUSH_EVENT"/>
            </intent-filter>
        </receiver>
        </service>


        <activity
+11 −25
Original line number Diff line number Diff line
[
  {
    "version": "3.29.2",
    "code": "518",
    "note": "Fixed:\n- Fix crash when changing the type of notifications\n- Fix issue with names not displayed fully\n- Fix a crash with notifications and Sharkey\n- Fix a crash when app is back to the foreground\n- Fix xmpp links not opening xmpp clients\n- Fix wrong muted time"
  },
  {
    "version": "3.29.1",
    "code": "517",
    "note": "Added:\n- Allow to edit scheduled messages from server side\n\nChanged:\n- Order list name alphabetically in profiles\n- Remove registration for Google\n\nFixed:\n- Push notifications\n- Peertube instances picker\n- Edit scheduled threads (local)\n- Instant search of Hashtag repeats results\n- Quotes broken with Markdowns\n- Fix reports crashes after submitting\n- Fix emoji picker when there is no result\n- Fix other crashes"
  },
  {
    "version": "3.28.2",
    "code": "515",
@@ -228,30 +238,6 @@
    "version": "3.14.3",
    "code": "465",
    "note": "Added:\n- Display date of the message instead of the boost (default: disabled)\n- Allow to disable release notes popup in Settings\n\nFixed:\n- Fix timelines slow down and stuttering after some scrolls\n- Fix color issues with follow buttons\n- Fix import from settings (import from login was OK)"
  },
  {
    "version": "3.14.2",
    "code": "464",
    "note": "Added:\n- Display familiar followers on profiles\n- Display and filter Instance directory\n\nChanged:\n- Bot and reply icon indicators more visible\n- Single media are hidden with link previews\n\nFixed:\n- Fix a crash with Art timelines\n- Friendica: media cannot be downloaded/shared\n- Fix a crash with pinned timelines"
  },
  {
    "version": "3.14.1",
    "code": "463",
    "note": "Added:\n- Search bar: display suggestions when starting by \"@\" or \"#\"\n\nChanged:\n- Preload media in timelines to avoid jumps\n- Search: Automatically switch to account tab if no results for tags\n\nFixed:\n- Fix jumps with the fetch more feature\n- Fix videos cannot be saved\n- Tags cannot be pinned when there are no custom tabs\n- PixelFed view: NSFW not honored\n- Fix crashes"
  },
  {
    "version": "3.14.0",
    "code": "462",
    "note": "Added:\n\n- Add Bubble timeline support in extra-features with filters\n- Allow to display public profiles by default to get all messages (Settings > Interface)\n- Glitch: Allow to post messages locally (Can be turned off in Settings)\n- Pixelfed: Custom layout to display Media fully (Also works for other software when there are media)\n- Allow to align left action buttons in messages\n\nChanged:\n- Full rework on links in messages (also mentions and tags)\n- Add pinned tag in \"any\" to avoid to lose it when renaming timeline\n\nFixed:\n- Links to messages not handled by the app\n- CW when editing a message\n- Fix push notifications with several accounts\n- New messages or edition notifications not pushed\n- Fix quotes with tags/mentions\n- Fix notifications\n- Fix sending multiple media\n- Fix crashes"
  },
  {
    "version": "3.13.7",
    "code": "461",
    "note": "Added:\n- Pixelfed: Custom layout to display Media fully \n*(Settings > Timelines > Pixelfed Presentation) - Also works for other softwares when there are media\n\nChanged:\n- Add pinned tag in \"any\" to avoid to lose it when renaming timeline\n\nFixed:\n- Fix push notifications with several accounts\n- Fix quotes with tags/mentions\n- Fix notifications\n- Fix sending multiple media\n- Some crashes"
  },
  {
    "version": "3.13.6",
    "code": "460",
    "note": "Fixed:\n- Cross-compose: Wrong instance emojis\n- Custom emojis not displayed in notifications\n- Fav/Boost markers with shared messages\n- Empty notifications\n- Fix cw removed when replying\n- Fix expand media with fit preview images when sensitive\n- Fix an issue with fetch more displayed too often (cache clear will help or wait new messages)"
  }

]
 No newline at end of file
+4 −3
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import static app.fedilab.android.mastodon.helper.Helper.PREF_USER_ID;
import static app.fedilab.android.mastodon.helper.Helper.PREF_USER_INSTANCE;
import static app.fedilab.android.mastodon.helper.Helper.PREF_USER_SOFTWARE;
import static app.fedilab.android.mastodon.helper.Helper.PREF_USER_TOKEN;
import static app.fedilab.android.mastodon.helper.Helper.TAG;
import static app.fedilab.android.mastodon.helper.Helper.displayReleaseNotesIfNeeded;
import static app.fedilab.android.mastodon.helper.ThemeHelper.fetchAccentColor;
import static app.fedilab.android.mastodon.ui.drawer.StatusAdapter.sendAction;
@@ -1372,6 +1373,7 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
        filterFetched = false;
        networkStateReceiver = new NetworkStateReceiver();
        networkStateReceiver.addListener(this);
        registerReceiver(networkStateReceiver, new IntentFilter(android.net.ConnectivityManager.CONNECTIVITY_ACTION));
        binding = ActivityMainBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());
        setSupportActionBar(binding.toolbar);
@@ -1944,10 +1946,9 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
        }
        if (networkStateReceiver != null) {
            try {
                networkStateReceiver.removeListener(this);
                unregisterReceiver(networkStateReceiver);
            } catch (IllegalArgumentException e) {
                e.printStackTrace();
            }
            } catch (Exception ignored) {}
        }
        SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(BaseMainActivity.this);
        boolean clearCacheExit = sharedpreferences.getBoolean(getString(R.string.SET_CLEAR_CACHE_EXIT), false);
Loading