mirror of
https://framagit.org/tom79/fedilab-tube
synced 2025-06-05 21:09:11 +02:00
some fixes
This commit is contained in:
@ -151,12 +151,14 @@ public class MainActivity extends AppCompatActivity {
|
||||
MenuItem myVideosItem = menu.findItem(R.id.action_myvideos);
|
||||
MenuItem playslistItem = menu.findItem(R.id.action_playlist);
|
||||
MenuItem historyItem = menu.findItem(R.id.action_history);
|
||||
MenuItem settingsItem = menu.findItem(R.id.action_settings);
|
||||
if (Helper.isLoggedIn(MainActivity.this)) {
|
||||
instanceItem.setVisible(false);
|
||||
uploadItem.setVisible(true);
|
||||
myVideosItem.setVisible(true);
|
||||
playslistItem.setVisible(true);
|
||||
historyItem.setVisible(true);
|
||||
settingsItem.setVisible(false);
|
||||
final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
||||
String userId = sharedpreferences.getString(Helper.PREF_KEY_ID, null);
|
||||
String instance = Helper.getLiveInstance(MainActivity.this);
|
||||
@ -171,6 +173,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
myVideosItem.setVisible(false);
|
||||
playslistItem.setVisible(false);
|
||||
historyItem.setVisible(false);
|
||||
settingsItem.setVisible(true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -184,6 +187,9 @@ public class MainActivity extends AppCompatActivity {
|
||||
showRadioButtonDialog();
|
||||
}
|
||||
return true;
|
||||
} else if (item.getItemId() == R.id.action_settings) {
|
||||
Intent intent = new Intent(MainActivity.this, SettingsActivity.class);
|
||||
startActivity(intent);
|
||||
} else if (item.getItemId() == R.id.action_account) {
|
||||
Intent intent;
|
||||
if (Helper.isLoggedIn(MainActivity.this)) {
|
||||
|
@ -648,10 +648,8 @@ public class PeertubeActivity extends AppCompatActivity {
|
||||
setFullscreen(FullScreenMediaController.fullscreen.OFF);
|
||||
}
|
||||
change();
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void manageVIewComment(APIResponse apiResponse) {
|
||||
if (apiResponse == null || (apiResponse.getError() != null && apiResponse.getError().getStatusCode() != 404 && apiResponse.getError() != null && apiResponse.getError().getStatusCode() != 501)) {
|
||||
if (apiResponse == null)
|
||||
@ -678,7 +676,6 @@ public class PeertubeActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
@ -686,6 +683,9 @@ public class PeertubeActivity extends AppCompatActivity {
|
||||
player.setPlayWhenReady(false);
|
||||
player.release();
|
||||
}
|
||||
if (fullScreenDialog != null && fullScreenDialog.isShowing()) {
|
||||
fullScreenDialog.dismiss();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -808,6 +808,7 @@ public class PeertubeActivity extends AppCompatActivity {
|
||||
fullScreenDialog.addContentView(playerView, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
|
||||
fullScreenIcon.setImageDrawable(ContextCompat.getDrawable(PeertubeActivity.this, R.drawable.ic_baseline_fullscreen_exit_24));
|
||||
fullScreenMode = true;
|
||||
|
||||
fullScreenDialog.show();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user