Removed the "(beta)"-tag from services (#8637)

pull/8687/head
litetex 2022-07-24 14:57:23 +02:00 zatwierdzone przez GitHub
rodzic 8f37015dbb
commit 51e72d1a05
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 4 dodań i 14 usunięć

Wyświetl plik

@ -374,8 +374,7 @@ public class MainActivity extends AppCompatActivity {
private void showServices() {
for (final StreamingService s : NewPipe.getServices()) {
final String title = s.getServiceInfo().getName()
+ (ServiceHelper.isBeta(s) ? " (beta)" : "");
final String title = s.getServiceInfo().getName();
final MenuItem menuItem = drawerLayoutBinding.navigation.getMenu()
.add(R.id.menu_services_group, s.getServiceId(), ORDER, title)
@ -383,7 +382,7 @@ public class MainActivity extends AppCompatActivity {
// peertube specifics
if (s.getServiceId() == 3) {
enhancePeertubeMenu(s, menuItem);
enhancePeertubeMenu(menuItem);
}
}
drawerLayoutBinding.navigation.getMenu()
@ -391,9 +390,9 @@ public class MainActivity extends AppCompatActivity {
.setChecked(true);
}
private void enhancePeertubeMenu(final StreamingService s, final MenuItem menuItem) {
private void enhancePeertubeMenu(final MenuItem menuItem) {
final PeertubeInstance currentInstance = PeertubeHelper.getCurrentInstance();
menuItem.setTitle(currentInstance.getName() + (ServiceHelper.isBeta(s) ? " (beta)" : ""));
menuItem.setTitle(currentInstance.getName());
final Spinner spinner = InstanceSpinnerLayoutBinding.inflate(LayoutInflater.from(this))
.getRoot();
final List<PeertubeInstance> instances = PeertubeHelper.getInstanceList(this);

Wyświetl plik

@ -169,15 +169,6 @@ public final class ServiceHelper {
}
}
public static boolean isBeta(final StreamingService s) {
switch (s.getServiceInfo().getName()) {
case "YouTube":
return false;
default:
return true;
}
}
public static void initService(final Context context, final int serviceId) {
if (serviceId == ServiceList.PeerTube.getServiceId()) {
final SharedPreferences sharedPreferences = PreferenceManager