diff --git a/app/src/main/java/app/fedilab/fedilabtube/PeertubeUploadActivity.java b/app/src/main/java/app/fedilab/fedilabtube/PeertubeUploadActivity.java index 31456a6..4847e3f 100644 --- a/app/src/main/java/app/fedilab/fedilabtube/PeertubeUploadActivity.java +++ b/app/src/main/java/app/fedilab/fedilabtube/PeertubeUploadActivity.java @@ -54,7 +54,7 @@ import java.util.Map; import java.util.UUID; import app.fedilab.fedilabtube.client.APIResponse; -import app.fedilab.fedilabtube.client.data.AccountData.Account; +import app.fedilab.fedilabtube.client.data.ChannelData; import app.fedilab.fedilabtube.helper.Helper; import app.fedilab.fedilabtube.viewmodel.ChannelsVM; import es.dmoral.toasty.Toasty; @@ -155,7 +155,7 @@ public class PeertubeUploadActivity extends AppCompatActivity { } public void manageVIewChannels(APIResponse apiResponse) { - if (apiResponse.getError() != null || apiResponse.getAccounts() == null || apiResponse.getAccounts().size() == 0) { + if (apiResponse.getError() != null || apiResponse.getChannels() == null || apiResponse.getChannels().size() == 0) { if (apiResponse.getError() != null && apiResponse.getError().getError() != null) Toasty.error(PeertubeUploadActivity.this, apiResponse.getError().getError(), Toast.LENGTH_LONG).show(); else @@ -164,14 +164,14 @@ public class PeertubeUploadActivity extends AppCompatActivity { } //Populate channels - List accounts = apiResponse.getAccounts(); - String[] channelName = new String[accounts.size()]; - String[] channelId = new String[accounts.size()]; + List channelsForUser = apiResponse.getChannels(); + String[] channelName = new String[channelsForUser.size()]; + String[] channelId = new String[channelsForUser.size()]; int i = 0; - for (Account account : accounts) { - channels.put(account.getUsername(), account.getId()); - channelName[i] = account.getUsername(); - channelId[i] = account.getId(); + for (ChannelData.Channel channel : channelsForUser) { + channels.put(channel.getName(), channel.getId()); + channelName[i] = channel.getName(); + channelId[i] = channel.getId(); i++; }