use of org.telegram.ui.Components.EmbedBottomSheet in project Telegram-FOSS by Telegram-FOSS-Team.
the class LaunchActivity method onConfigurationChanged.
@Override
public void onConfigurationChanged(Configuration newConfig) {
AndroidUtilities.checkDisplaySize(this, newConfig);
super.onConfigurationChanged(newConfig);
checkLayout();
PipRoundVideoView pipRoundVideoView = PipRoundVideoView.getInstance();
if (pipRoundVideoView != null) {
pipRoundVideoView.onConfigurationChanged();
}
EmbedBottomSheet embedBottomSheet = EmbedBottomSheet.getInstance();
if (embedBottomSheet != null) {
embedBottomSheet.onConfigurationChanged(newConfig);
}
PhotoViewer photoViewer = PhotoViewer.getPipInstance();
if (photoViewer != null) {
photoViewer.onConfigurationChanged(newConfig);
}
ThemeEditorView editorView = ThemeEditorView.getInstance();
if (editorView != null) {
editorView.onConfigurationChanged();
}
if (Theme.selectedAutoNightType == Theme.AUTO_NIGHT_TYPE_SYSTEM) {
Theme.checkAutoNightThemeConditions();
}
}
use of org.telegram.ui.Components.EmbedBottomSheet in project Telegram-FOSS by Telegram-FOSS-Team.
the class LaunchActivity method onDestroy.
@Override
protected void onDestroy() {
if (PhotoViewer.getPipInstance() != null) {
PhotoViewer.getPipInstance().destroyPhotoViewer();
}
if (PhotoViewer.hasInstance()) {
PhotoViewer.getInstance().destroyPhotoViewer();
}
if (SecretMediaViewer.hasInstance()) {
SecretMediaViewer.getInstance().destroyPhotoViewer();
}
if (ArticleViewer.hasInstance()) {
ArticleViewer.getInstance().destroyArticleViewer();
}
if (ContentPreviewViewer.hasInstance()) {
ContentPreviewViewer.getInstance().destroy();
}
if (GroupCallActivity.groupCallInstance != null) {
GroupCallActivity.groupCallInstance.dismissInternal();
}
PipRoundVideoView pipRoundVideoView = PipRoundVideoView.getInstance();
MediaController.getInstance().setBaseActivity(this, false);
MediaController.getInstance().setFeedbackView(actionBarLayout, false);
if (pipRoundVideoView != null) {
pipRoundVideoView.close(false);
}
Theme.destroyResources();
EmbedBottomSheet embedBottomSheet = EmbedBottomSheet.getInstance();
if (embedBottomSheet != null) {
embedBottomSheet.destroy();
}
ThemeEditorView editorView = ThemeEditorView.getInstance();
if (editorView != null) {
editorView.destroy();
}
try {
if (visibleDialog != null) {
visibleDialog.dismiss();
visibleDialog = null;
}
} catch (Exception e) {
FileLog.e(e);
}
try {
if (onGlobalLayoutListener != null) {
final View view = getWindow().getDecorView().getRootView();
view.getViewTreeObserver().removeOnGlobalLayoutListener(onGlobalLayoutListener);
}
} catch (Exception e) {
FileLog.e(e);
}
super.onDestroy();
onFinish();
}
Aggregations