mirror of
				https://framagit.org/tom79/fedilab-tube
				synced 2025-06-05 21:09:11 +02:00 
			
		
		
		
	Fix issue #85
This commit is contained in:
		| @@ -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()); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user