Loading app/src/main/java/app/fedilab/android/peertube/activities/AccountActivity.java +1 −2 Original line number Diff line number Diff line Loading @@ -65,8 +65,7 @@ public class AccountActivity extends BaseBarActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); binding = ActivityAccountPeertubeBinding.inflate(getLayoutInflater()); View view = binding.getRoot(); setContentView(view); setContentView(binding.getRoot()); if (getSupportActionBar() != null) getSupportActionBar().setDisplayHomeAsUpEnabled(true); Loading app/src/main/java/app/fedilab/android/peertube/activities/PeertubeMainActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -518,7 +518,7 @@ public class PeertubeMainActivity extends PeertubeBaseMainActivity { account.refresh_token = token.getRefresh_token(); account.peertube_account = userMe.getAccount(); account.software = Account.API.PEERTUBE.name(); account.user_id = userMe.getAccount().getUserId(); account.user_id = userMe.getAccount().getId(); account.instance = userMe.getAccount().getHost(); SharedPreferences.Editor editor = sharedpreferences.edit(); editor.putString(PREF_USER_TOKEN, token.getAccess_token()); Loading app/src/main/java/app/fedilab/android/peertube/client/RetrofitPeertubeAPI.java +1 −1 Original line number Diff line number Diff line Loading @@ -180,7 +180,7 @@ public class RetrofitPeertubeAPI { account.api = Account.API.PEERTUBE; account.software = Account.API.PEERTUBE.name(); account.peertube_account = peertubeAccount; account.user_id = peertubeAccount.getUserId(); account.user_id = peertubeAccount.getId(); SharedPreferences.Editor editor = sharedpreferences.edit(); editor.putString(PREF_USER_ID, account.user_id); editor.putString(PREF_USER_INSTANCE, host); Loading app/src/main/java/app/fedilab/android/peertube/drawer/ChannelListAdapter.java +4 −0 Original line number Diff line number Diff line Loading @@ -140,6 +140,10 @@ public class ChannelListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHo private boolean isMyChannel(Channel channel) { SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context); if (channel.getOwnerAccount() == null) { return true; } String channeIdOwner = channel.getOwnerAccount().getId(); String channeInstanceOwner = channel.getOwnerAccount().getHost(); String instanceShar = sharedpreferences.getString(PREF_USER_INSTANCE, null); Loading app/src/main/java/app/fedilab/android/peertube/fragment/DisplayChannelsFragment.java +4 −7 Original line number Diff line number Diff line Loading @@ -95,14 +95,11 @@ public class DisplayChannelsFragment extends Fragment implements ChannelListAdap search_peertube = bundle.getString("search_peertube", null); } if (getActivity() != null) { action_button = getActivity().findViewById(R.id.action_button); if (action_button != null) { action_button.setVisibility(View.VISIBLE); action_button.setOnClickListener(view -> manageAlert(null)); } } binding.lvElements.addItemDecoration(new DividerItemDecoration(context, DividerItemDecoration.VERTICAL)); channelListAdapter = new ChannelListAdapter(this.channels); channelListAdapter.allChannelRemoved = this; Loading Loading
app/src/main/java/app/fedilab/android/peertube/activities/AccountActivity.java +1 −2 Original line number Diff line number Diff line Loading @@ -65,8 +65,7 @@ public class AccountActivity extends BaseBarActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); binding = ActivityAccountPeertubeBinding.inflate(getLayoutInflater()); View view = binding.getRoot(); setContentView(view); setContentView(binding.getRoot()); if (getSupportActionBar() != null) getSupportActionBar().setDisplayHomeAsUpEnabled(true); Loading
app/src/main/java/app/fedilab/android/peertube/activities/PeertubeMainActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -518,7 +518,7 @@ public class PeertubeMainActivity extends PeertubeBaseMainActivity { account.refresh_token = token.getRefresh_token(); account.peertube_account = userMe.getAccount(); account.software = Account.API.PEERTUBE.name(); account.user_id = userMe.getAccount().getUserId(); account.user_id = userMe.getAccount().getId(); account.instance = userMe.getAccount().getHost(); SharedPreferences.Editor editor = sharedpreferences.edit(); editor.putString(PREF_USER_TOKEN, token.getAccess_token()); Loading
app/src/main/java/app/fedilab/android/peertube/client/RetrofitPeertubeAPI.java +1 −1 Original line number Diff line number Diff line Loading @@ -180,7 +180,7 @@ public class RetrofitPeertubeAPI { account.api = Account.API.PEERTUBE; account.software = Account.API.PEERTUBE.name(); account.peertube_account = peertubeAccount; account.user_id = peertubeAccount.getUserId(); account.user_id = peertubeAccount.getId(); SharedPreferences.Editor editor = sharedpreferences.edit(); editor.putString(PREF_USER_ID, account.user_id); editor.putString(PREF_USER_INSTANCE, host); Loading
app/src/main/java/app/fedilab/android/peertube/drawer/ChannelListAdapter.java +4 −0 Original line number Diff line number Diff line Loading @@ -140,6 +140,10 @@ public class ChannelListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHo private boolean isMyChannel(Channel channel) { SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context); if (channel.getOwnerAccount() == null) { return true; } String channeIdOwner = channel.getOwnerAccount().getId(); String channeInstanceOwner = channel.getOwnerAccount().getHost(); String instanceShar = sharedpreferences.getString(PREF_USER_INSTANCE, null); Loading
app/src/main/java/app/fedilab/android/peertube/fragment/DisplayChannelsFragment.java +4 −7 Original line number Diff line number Diff line Loading @@ -95,14 +95,11 @@ public class DisplayChannelsFragment extends Fragment implements ChannelListAdap search_peertube = bundle.getString("search_peertube", null); } if (getActivity() != null) { action_button = getActivity().findViewById(R.id.action_button); if (action_button != null) { action_button.setVisibility(View.VISIBLE); action_button.setOnClickListener(view -> manageAlert(null)); } } binding.lvElements.addItemDecoration(new DividerItemDecoration(context, DividerItemDecoration.VERTICAL)); channelListAdapter = new ChannelListAdapter(this.channels); channelListAdapter.allChannelRemoved = this; Loading