Fix channel issue for playlist
This commit is contained in:
parent
ed05ef141e
commit
0b373c53f5
|
@ -118,7 +118,7 @@ public class DisplayPlaylistsFragment extends Fragment implements OnPlaylistActi
|
||||||
|
|
||||||
|
|
||||||
LinkedHashMap<String, String> translations = null;
|
LinkedHashMap<String, String> translations = null;
|
||||||
if( peertubeInformation.getTranslations() != null)
|
if( peertubeInformation != null && peertubeInformation.getTranslations() != null)
|
||||||
translations = new LinkedHashMap<>(peertubeInformation.getTranslations());
|
translations = new LinkedHashMap<>(peertubeInformation.getTranslations());
|
||||||
|
|
||||||
LinkedHashMap<Integer, String> privaciesInit = new LinkedHashMap<>(peertubeInformation.getPrivacies());
|
LinkedHashMap<Integer, String> privaciesInit = new LinkedHashMap<>(peertubeInformation.getPrivacies());
|
||||||
|
@ -170,7 +170,6 @@ public class DisplayPlaylistsFragment extends Fragment implements OnPlaylistActi
|
||||||
Helper.changeMaterialSpinnerColor(context, set_upload_channel);
|
Helper.changeMaterialSpinnerColor(context, set_upload_channel);
|
||||||
|
|
||||||
new RetrievePeertubeChannelsAsyncTask(context, DisplayPlaylistsFragment.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
new RetrievePeertubeChannelsAsyncTask(context, DisplayPlaylistsFragment.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||||
channels = new HashMap<>();
|
|
||||||
|
|
||||||
display_name.setFilters(new InputFilter[]{new InputFilter.LengthFilter(120)});
|
display_name.setFilters(new InputFilter[]{new InputFilter.LengthFilter(120)});
|
||||||
description.setFilters(new InputFilter[]{new InputFilter.LengthFilter(1000)});
|
description.setFilters(new InputFilter[]{new InputFilter.LengthFilter(1000)});
|
||||||
|
@ -374,9 +373,12 @@ public class DisplayPlaylistsFragment extends Fragment implements OnPlaylistActi
|
||||||
|
|
||||||
//Populate channels
|
//Populate channels
|
||||||
List<Account> accounts = apiResponse.getAccounts();
|
List<Account> accounts = apiResponse.getAccounts();
|
||||||
String[] channelName = new String[accounts.size()];
|
String[] channelName = new String[accounts.size()+1];
|
||||||
String[] channelId= new String[accounts.size()];
|
String[] channelId= new String[accounts.size()+1];
|
||||||
int i = 0;
|
int i = 1;
|
||||||
|
channelName[0] = "";
|
||||||
|
channelId[0] = "";
|
||||||
|
channels = new HashMap<>();
|
||||||
for(Account account: accounts){
|
for(Account account: accounts){
|
||||||
channels.put(account.getUsername(),account.getId());
|
channels.put(account.getUsername(),account.getId());
|
||||||
channelName[i] = account.getUsername();
|
channelName[i] = account.getUsername();
|
||||||
|
|
|
@ -42,7 +42,6 @@
|
||||||
android:layout_weight="3"
|
android:layout_weight="3"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
<TextView
|
<TextView
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
@ -51,7 +50,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/channel"/>
|
android:text="@string/channel"/>
|
||||||
<com.jaredrummler.materialspinner.MaterialSpinner
|
<com.jaredrummler.materialspinner.MaterialSpinner
|
||||||
android:textSize="16sp"
|
android:textSize="14sp"
|
||||||
android:id="@+id/set_upload_channel"
|
android:id="@+id/set_upload_channel"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
|
@ -63,7 +62,6 @@
|
||||||
android:layout_weight="2"
|
android:layout_weight="2"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
<TextView
|
<TextView
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
@ -72,7 +70,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/action_privacy"/>
|
android:text="@string/action_privacy"/>
|
||||||
<com.jaredrummler.materialspinner.MaterialSpinner
|
<com.jaredrummler.materialspinner.MaterialSpinner
|
||||||
android:textSize="16sp"
|
android:textSize="14sp"
|
||||||
android:id="@+id/set_upload_privacy"
|
android:id="@+id/set_upload_privacy"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
|
|
Loading…
Reference in New Issue