fixed bad display when coming back from share action

This commit is contained in:
David Idmansour 2018-08-28 14:29:25 +02:00
parent 381a648a9b
commit 95f23242fd
2 changed files with 10 additions and 1 deletions

View file

@ -50,6 +50,16 @@
[self.view removeFromSuperview];
}
- (void)viewDidAppear:(BOOL)animated {
[_playButton setTitle:@"" forState:UIControlStateNormal];
if (player && linphone_player_get_state(player) == LinphonePlayerPlaying)
[_playButton setImage:[UIImage imageFromSystemBarButton:UIBarButtonSystemItemPause:[UIColor blackColor]] forState:UIControlStateNormal];
else
[_playButton setImage:[UIImage imageFromSystemBarButton:UIBarButtonSystemItemPlay:[UIColor blackColor]] forState:UIControlStateNormal];
[_stopButton setTitle:@"" forState:UIControlStateNormal];
[_stopButton setImage:[UIImage imageFromSystemBarButton:UIBarButtonSystemItemRefresh:[UIColor blackColor]] forState:UIControlStateNormal];
}
- (void)open {
linphone_player_open(player, file.UTF8String);
duration = linphone_player_get_duration(player);

View file

@ -20,7 +20,6 @@ static UILinphoneAudioPlayer *player;
* TODO:
* - When we scroll past a selected row, the player loads incorrectly (no buttons). Probably a problem in the player code.
* - mkv recording is probably buggy, wrong eof. wav playing works but does not display the length/timestamp.
* - When coming back from the action extension (to share a recording), we have to pop and reload the view for it to dislpay correctly. Find out why?
* - The share button is greyed out when not clicking it. idk why, it's really weird.
*/
- (id)initWithIdentifier:(NSString *)identifier {