Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RefreshView on Android at .net 8 preview 7 don't stop refreshing #17338

Closed
KarsaOrlong1981 opened this issue Sep 13, 2023 · 1 comment
Closed
Labels

Comments

@KarsaOrlong1981
Copy link

KarsaOrlong1981 commented Sep 13, 2023

Description

When you swipe down to refresh collectionView it will start refresh loading correctly but it dosen't stop loading. The bindable property that is bind to IsRefreshing changes correctly and at .net 7 it was working fine with the same code, nothing changed only the framework from .net 7 to .net 8 preview 7. When I set IsRefreshing manualy to false at runtime it will stop.

untitled

<RefreshView
       Margin="0,-6,0,0"
       IsVisible="{Binding IsRoom}"
       Command="{Binding RefreshCommand}"
       IsClippedToBounds="True"
       IsRefreshing="{Binding IsLoading}"
       RefreshColor="{StaticResource YouviRed}">  
       <controls:DefaultCollectionView
          Margin="0,4,0,0"
          BackgroundColor="{DynamicResource BackgroundGray}"
          ItemsLayout="VerticalGrid, 2" 
          ScrollToItem="{Binding ScrollToItem, Mode=TwoWay}"
          ItemsSource="{Binding Widgets}"
          ItemTemplate="{StaticResource DeviceTemplateSelector}" >
       </controls:DefaultCollectionView>                                
   </RefreshView>

 public bool IsLoading
 {
     get => isLoading;
     set
     {
         if (isLoading != value)
         {
             isLoading = value;
             OnPropertyChanged(nameof(IsLoading));
         }
     }
 }

  public ICommand RefreshCommand =>
      refreshCommand
      ?? (refreshCommand = new RelayCommand(async () => await RefreshAction()));

  private async Task RefreshAction()
  {
      IsLoading = true;
      try
      {
          await Task.Run(async () => await youviService.RefreshYouvis(true));
      }
      finally
      {
          IsLoading = false;
      }
  }

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

8.0.0-preview.7.8842

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

7.0.92

Affected platforms

Android

Affected platform versions

Android 13

Did you find any workaround?

No response

Relevant log output

No response

@KarsaOrlong1981 KarsaOrlong1981 added the t/bug Something isn't working label Sep 13, 2023
@ghost ghost added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Sep 13, 2023
@jsuarezruiz jsuarezruiz added platform/android 🤖 and removed legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor labels Sep 13, 2023
@samhouts
Copy link
Member

Duplicate of #16910

@samhouts samhouts marked this as a duplicate of #16910 Sep 13, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Oct 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants