Search in sources :

Example 1 with EmbedBottomSheet

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();
    }
}
Also used : EmbedBottomSheet(org.telegram.ui.Components.EmbedBottomSheet) PipRoundVideoView(org.telegram.ui.Components.PipRoundVideoView) ThemeEditorView(org.telegram.ui.Components.ThemeEditorView)

Example 2 with EmbedBottomSheet

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();
}
Also used : EmbedBottomSheet(org.telegram.ui.Components.EmbedBottomSheet) PipRoundVideoView(org.telegram.ui.Components.PipRoundVideoView) ThemeEditorView(org.telegram.ui.Components.ThemeEditorView) ImageView(android.widget.ImageView) UndoView(org.telegram.ui.Components.UndoView) PipRoundVideoView(org.telegram.ui.Components.PipRoundVideoView) PasscodeView(org.telegram.ui.Components.PasscodeView) SimpleTextView(org.telegram.ui.ActionBar.SimpleTextView) ThemeEditorView(org.telegram.ui.Components.ThemeEditorView) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) TermsOfServiceView(org.telegram.ui.Components.TermsOfServiceView) RLottieImageView(org.telegram.ui.Components.RLottieImageView) BlockingUpdateView(org.telegram.ui.Components.BlockingUpdateView) TextView(android.widget.TextView) RecyclerListView(org.telegram.ui.Components.RecyclerListView) ParseException(java.text.ParseException)

Aggregations

EmbedBottomSheet (org.telegram.ui.Components.EmbedBottomSheet)2 PipRoundVideoView (org.telegram.ui.Components.PipRoundVideoView)2 ThemeEditorView (org.telegram.ui.Components.ThemeEditorView)2 View (android.view.View)1 ImageView (android.widget.ImageView)1 TextView (android.widget.TextView)1 RecyclerView (androidx.recyclerview.widget.RecyclerView)1 ParseException (java.text.ParseException)1 SimpleTextView (org.telegram.ui.ActionBar.SimpleTextView)1 BlockingUpdateView (org.telegram.ui.Components.BlockingUpdateView)1 PasscodeView (org.telegram.ui.Components.PasscodeView)1 RLottieImageView (org.telegram.ui.Components.RLottieImageView)1 RecyclerListView (org.telegram.ui.Components.RecyclerListView)1 TermsOfServiceView (org.telegram.ui.Components.TermsOfServiceView)1 UndoView (org.telegram.ui.Components.UndoView)1