فهرست منبع

网盘界面可以拉到低不被播放条遮挡

onecold 8 ماه پیش
والد
کامیت
3fda1ad31e

+ 15 - 2
entry/src/main/ets/pages/NewIndex.ets

@@ -531,6 +531,19 @@ struct NewIndex {
     .alignItems(HorizontalAlign.Center)
   }
 
+  setShowPlayTrue(){
+    if (this.isShowPlay === true) {
+      this.isShowPlay = false
+    }
+    this.getUIContext()?.animateTo({
+      duration: 500,
+      curve: Curve.Friction
+    }, () => {
+      this.isShowPlay = true;
+    });
+    this.getUIContext().getHostContext()!.eventHub.emit('showPlayerView');
+  }
+
   @Builder
   PlayController() {
     Row() {
@@ -540,7 +553,7 @@ struct NewIndex {
           this.centerName()
         }.layoutWeight(1)
         .onClick(()=>{
-          this.getUIContext().getHostContext()!.eventHub.emit('showPlayerView');
+          this.setShowPlayTrue()
         })
         this.playConLeft(false)
 
@@ -607,7 +620,7 @@ struct NewIndex {
     .layoutWeight(isLeft?1:0)
     .clickEffect({ level: ClickEffectLevel.MIDDLE, scale: 0.8 })
     .onClick(() => {
-      this.getUIContext().getHostContext()!.eventHub.emit('showPlayerView');
+      this.setShowPlayTrue()
     })
   }
 

+ 0 - 1
entry/src/main/ets/pages/SettingPage.ets

@@ -2175,7 +2175,6 @@ export struct SettingPage {
             .clickEffect({ level: ClickEffectLevel.HEAVY })
 
             Line().width('100%').height(0.3).backgroundColor($r('app.color.index_tab_unselected_font_color'))
-              .visibility(Visibility.None)
             Row() {
               SymbolGlyph($r('sys.symbol.sun_max'))
                 .fontSize(20)

+ 1 - 1
entry/src/main/ets/pages/WebDavMainPage.ets

@@ -1148,7 +1148,7 @@ export struct WebDavMainPage {
         }
         .scrollBar(BarState.Off)
         .contentStartOffset(this.topSafeHeight + 80)
-        .contentEndOffset(this.bottomSafeHeight)
+        .contentEndOffset(this.bottomSafeHeight+70)
         .layoutWeight(1)
         .margin({ top: 4 })
       } else if (!this.isLoading) {

+ 1 - 1
entry/src/main/ets/view/LocalMusic.ets

@@ -7228,7 +7228,7 @@ export struct LocalMusic {
   showPlayerView() {
     console.info('onecold  showPlayerView  this.songList'+ JSON.stringify(this.songList))
     if (ArrayUtil.isNotEmpty(this.songList)) {
-      this.setShowPlayTrue()
+      // this.setShowPlayTrue()
       let lyricPath = this.videoUrl.substring(0, this.videoUrl.lastIndexOf('.')) + '.lrc';
       this.initLyric(lyricPath);
       this.startAutoHide();

+ 2 - 0
entry/src/main/ets/view/NavidromePage.ets

@@ -50,6 +50,7 @@ export struct NavidromePage {
   @Link offsetX: number;
   @Link isShowDrawer: boolean;
   @State isNoJumpToHome: boolean = false //网盘播放不跳转首页
+  @StorageProp('bottomSafeHeight') bottomSafeHeight: number = 0;
   @Prop @Watch('onSwitchAccount') selectedAccount: WebDavAccount;
   @StorageProp('currentTheme') currentTheme: number = 0;
   @State selectedTab: number = 0; // 0: 全部, 1: 艺术家, 2: 专辑
@@ -1387,6 +1388,7 @@ export struct NavidromePage {
       .cachedCount(3)
       .padding({ top: 5, bottom: 5 })
       .listDirection(Axis.Vertical)
+      .contentEndOffset(this.bottomSafeHeight+70)
       .scrollBar(BarState.Auto)
       .edgeEffect(EdgeEffect.Spring)
       .onReachEnd(() => {