Merge branch 'dev' into dev

This commit is contained in:
B0pol 2020-01-19 18:09:17 +01:00 committed by GitHub
commit e58088d290
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 34 additions and 67 deletions

View File

@ -11,8 +11,8 @@ android {
applicationId "org.schabi.newpipe" applicationId "org.schabi.newpipe"
minSdkVersion 19 minSdkVersion 19
targetSdkVersion 28 targetSdkVersion 28
versionCode 800 versionCode 810
versionName "0.18.0" versionName "0.18.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true vectorDrawables.useSupportLibrary = true

View File

@ -454,6 +454,16 @@ public class MainActivity extends AppCompatActivity {
sharedPreferences.edit().putBoolean(Constants.KEY_MAIN_PAGE_CHANGE, false).apply(); sharedPreferences.edit().putBoolean(Constants.KEY_MAIN_PAGE_CHANGE, false).apply();
NavigationHelper.openMainActivity(this); NavigationHelper.openMainActivity(this);
} }
if (sharedPreferences.getBoolean(Constants.KEY_ENABLE_WATCH_HISTORY, true)) {
if (DEBUG) Log.d(TAG, "do not show History-menu as its disabled in settings");
drawerItems.getMenu().findItem(ITEM_ID_HISTORY).setVisible(true);
}
if (!sharedPreferences.getBoolean(Constants.KEY_ENABLE_WATCH_HISTORY, true)) {
if (DEBUG) Log.d(TAG, "show History-menu as its enabled in settings");
drawerItems.getMenu().findItem(ITEM_ID_HISTORY).setVisible(false);
}
} }
@Override @Override
@ -556,8 +566,6 @@ public class MainActivity extends AppCompatActivity {
if (!(fragment instanceof SearchFragment)) { if (!(fragment instanceof SearchFragment)) {
findViewById(R.id.toolbar).findViewById(R.id.toolbar_search_container).setVisibility(View.GONE); findViewById(R.id.toolbar).findViewById(R.id.toolbar_search_container).setVisibility(View.GONE);
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.main_menu, menu);
} }
ActionBar actionBar = getSupportActionBar(); ActionBar actionBar = getSupportActionBar();
@ -579,14 +587,6 @@ public class MainActivity extends AppCompatActivity {
case android.R.id.home: case android.R.id.home:
onHomeButtonPressed(); onHomeButtonPressed();
return true; return true;
case R.id.action_show_downloads:
return NavigationHelper.openDownloads(this);
case R.id.action_history:
NavigationHelper.openStatisticFragment(getSupportFragmentManager());
return true;
case R.id.action_settings:
NavigationHelper.openSettings(this);
return true;
default: default:
return super.onOptionsItemSelected(item); return super.onOptionsItemSelected(item);
} }

View File

@ -104,11 +104,6 @@ public class AboutActivity extends AppCompatActivity {
case android.R.id.home: case android.R.id.home:
finish(); finish();
return true; return true;
case R.id.action_settings:
NavigationHelper.openSettings(this);
return true;
case R.id.action_show_downloads:
return NavigationHelper.openDownloads(this);
} }
return super.onOptionsItemSelected(item); return super.onOptionsItemSelected(item);

View File

@ -82,11 +82,7 @@ public class DownloadActivity extends AppCompatActivity {
onBackPressed(); onBackPressed();
return true; return true;
} }
case R.id.action_settings: {
Intent intent = new Intent(this, SettingsActivity.class);
startActivity(intent);
return true;
}
default: default:
return super.onOptionsItemSelected(item); return super.onOptionsItemSelected(item);
} }

View File

@ -160,10 +160,6 @@ public abstract class ServicePlayerActivity extends AppCompatActivity
case R.id.action_append_playlist: case R.id.action_append_playlist:
appendAllToPlaylist(); appendAllToPlaylist();
return true; return true;
case R.id.action_settings:
NavigationHelper.openSettings(this);
redraw = true;
return true;
case R.id.action_system_audio: case R.id.action_system_audio:
startActivity(new Intent(Settings.ACTION_SOUND_SETTINGS)); startActivity(new Intent(Settings.ACTION_SOUND_SETTINGS));
return true; return true;

View File

@ -11,5 +11,7 @@ public class Constants {
public static final String KEY_THEME_CHANGE = "key_theme_change"; public static final String KEY_THEME_CHANGE = "key_theme_change";
public static final String KEY_MAIN_PAGE_CHANGE = "key_main_page_change"; public static final String KEY_MAIN_PAGE_CHANGE = "key_main_page_change";
public static final String KEY_ENABLE_WATCH_HISTORY = "enable_watch_history";
public static final int NO_SERVICE_ID = -1; public static final int NO_SERVICE_ID = -1;
} }

View File

@ -27,8 +27,4 @@
android:title="@string/clear_download_history" android:title="@string/clear_download_history"
app:showAsAction="ifRoom" /> app:showAsAction="ifRoom" />
<item android:id="@+id/action_settings"
android:title="@string/settings"
app:showAsAction="never" />
</menu> </menu>

View File

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_show_downloads"
android:orderInCategory="980"
android:title="@string/downloads"
app:showAsAction="never"/>
<item
android:id="@+id/action_history"
android:orderInCategory="981"
android:title="@string/action_history"
app:showAsAction="never"/>
<item
android:id="@+id/action_settings"
android:orderInCategory="990"
android:title="@string/settings"
app:showAsAction="never"/>
</menu>

View File

@ -3,14 +3,4 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
tools:context="org.schabi.newpipe.about.AboutActivity"> tools:context="org.schabi.newpipe.about.AboutActivity">
<item android:id="@+id/action_show_downloads"
android:orderInCategory="980"
android:title="@string/downloads"
app:showAsAction="never"/>
<item android:id="@+id/action_settings"
android:orderInCategory="990"
android:title="@string/settings"
app:showAsAction="never"/>
</menu> </menu>

View File

@ -10,11 +10,6 @@
android:visible="true" android:visible="true"
app:showAsAction="ifRoom"/> app:showAsAction="ifRoom"/>
<item android:id="@+id/action_settings"
android:orderInCategory="990"
android:title="@string/settings"
app:showAsAction="never"/>
<item android:id="@+id/action_system_audio" <item android:id="@+id/action_system_audio"
android:orderInCategory="996" android:orderInCategory="996"
android:title="@string/play_queue_audio_settings" android:title="@string/play_queue_audio_settings"

View File

@ -0,0 +1,19 @@
New
• Show video thumbnail on the lock screen when playing in the background
Improved
• Add local playlist to queue when long pressing on background / popup button
• Make main page tabs scrollable and hide when there is only a single tab
• Limit amount of notification thumbnail updates in background player
• Add dummy thumbnail for empty local playlists
• Use *.opus file extension instead of *.webm and show "opus" in format label instead of "WebM Opus" in the download dropdown
• Add button to delete downloaded files or download history in "Downloads"
• [YouTube] Add support to /c/shortened_url channel links
Fixed
• Fixed multiple issues when sharing a video to NewPipe and downloading its streams directly
• Fixed player access out of its creation thread
• Fixed search result paging
• [YouTube] Fixed switching on null causing NPE
• [YouTube] Fixed viewing comments when opening an invidio.us url
• [SoundCloud] Updated client_id