Fix issue #85
This commit is contained in:
parent
c8e7c23855
commit
acba219e44
|
@ -22,6 +22,8 @@ import android.content.SharedPreferences;
|
|||
import android.content.pm.PackageManager;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
|
@ -58,6 +60,7 @@ import java.util.UUID;
|
|||
import app.fedilab.fedilabtube.client.APIResponse;
|
||||
import app.fedilab.fedilabtube.client.RetrofitPeertubeAPI;
|
||||
import app.fedilab.fedilabtube.client.data.ChannelData.Channel;
|
||||
import app.fedilab.fedilabtube.client.data.VideoData;
|
||||
import app.fedilab.fedilabtube.client.data.VideoData.Video;
|
||||
import app.fedilab.fedilabtube.client.entities.Item;
|
||||
import app.fedilab.fedilabtube.client.entities.ItemStr;
|
||||
|
@ -225,6 +228,7 @@ public class PeertubeEditUploadActivity extends AppCompatActivity {
|
|||
|
||||
TimelineVM feedsViewModel = new ViewModelProvider(PeertubeEditUploadActivity.this).get(TimelineVM.class);
|
||||
feedsViewModel.getMyVideo(null, videoId).observe(PeertubeEditUploadActivity.this, this::manageVIewVideo);
|
||||
|
||||
channels = new LinkedHashMap<>();
|
||||
|
||||
setTitle(R.string.edit_video);
|
||||
|
@ -330,6 +334,23 @@ public class PeertubeEditUploadActivity extends AppCompatActivity {
|
|||
p_video_title.setText(title);
|
||||
p_video_description.setText(video.getDescription());
|
||||
|
||||
new Thread(() -> {
|
||||
try {
|
||||
RetrofitPeertubeAPI api;
|
||||
api = new RetrofitPeertubeAPI(PeertubeEditUploadActivity.this);
|
||||
VideoData.Description description = api.getVideoDescription(video.getUuid());
|
||||
Handler mainHandler = new Handler(Looper.getMainLooper());
|
||||
Runnable myRunnable = () -> {
|
||||
if (description == null) {
|
||||
p_video_description.setText(description.getDescription());
|
||||
}
|
||||
};
|
||||
mainHandler.post(myRunnable);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}).start();
|
||||
|
||||
LinkedHashMap<Integer, String> categories = new LinkedHashMap<>(peertubeInformation.getCategories());
|
||||
LinkedHashMap<Integer, String> licences = new LinkedHashMap<>(peertubeInformation.getLicences());
|
||||
LinkedHashMap<Integer, String> privacies = new LinkedHashMap<>(peertubeInformation.getPrivacies());
|
||||
|
|
Loading…
Reference in New Issue