Commit 1bb90462 authored by Thomas's avatar Thomas
Browse files

- Fix notification tabs count and foreground service stop

parent bbcf9138
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -90,6 +90,6 @@ public class FedilabNotificationPageAdapter extends FragmentStatePagerAdapter {

    @Override
    public int getCount() {
        return extended ? 10 : 2;
        return extended ? 11 : 2;
    }
}
 No newline at end of file
+5 −1
Original line number Diff line number Diff line
@@ -104,7 +104,10 @@ public class RetrieveInfoService extends Service implements NetworkStateReceiver
                peertubeInformation.setTranslations(new LinkedHashMap<>());
                peertubeInformation = new RetrofitPeertubeAPI(RetrieveInfoService.this).getPeertubeInformation();
                Handler mainHandler = new Handler(Looper.getMainLooper());
                Runnable myRunnable = () -> stopForeground(true);
                Runnable myRunnable = () -> {
                    stopForeground(true);
                    stopSelf();
                };
                mainHandler.post(myRunnable);
            }
        };
@@ -151,6 +154,7 @@ public class RetrieveInfoService extends Service implements NetworkStateReceiver
                    peertubeInformation = new RetrofitPeertubeAPI(RetrieveInfoService.this).getPeertubeInformation();
                }
                stopForeground(true);
                stopSelf();
            }
        };
        thread.start();