reactiveui / ReactiveUI

An advanced, composable, functional reactive model-view-viewmodel framework for all .NET platforms that is inspired by functional reactive programming. ReactiveUI allows you to abstract mutable state away from your user interfaces, express the idea around a feature in one readable place and improve the testability of your application.
https://www.reactiveui.net
MIT License
8.11k stars 1.12k forks source link

[Bug]: reactiveui.fody 19.5.41 bool value does not notify UI when using [Reactive] and bool value changed #3867

Closed SeptMorning closed 3 months ago

SeptMorning commented 3 months ago

Describe the bug 🐞

I have a class named SyncAssistVM : ReactiveObject. situation: [Reactive] public bool PauseBtnEnable { get; set; } = false;, it does not notify ui when the value changed; so far I've only seen this with bool.

Step to reproduce

public bool SyncBtnEnable
    {
        get => _syncBtnEnable;
        set => this.RaiseAndSetIfChanged(ref _syncBtnEnable, value);
    }

it works on value changed.

Reproduction repository

https://github.com/reactiveui/ReactiveUI

Expected behavior

[Reactive] should work with bool just like it works with string property changed

Screenshots 🖼️

image

IDE

No response

Operating system

Windows, Mac OS

Version

windows 11, 10, macos 14.5

Device

laptop

ReactiveUI Version

19.5.41

Additional information ℹ️

No response

ChrisPulman commented 3 months ago

If you are able to put a simple repo together to demonstrate the issue you are experiencing, this will help us to help you resolve the issue.

ChrisPulman commented 3 months ago

If your creating a new project you could also try using ReactiveUI.SourceGenerators https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html

The manual way to create properties in ReactiveUI | An advanced, composable, reactive model-view-viewmodel framework
SeptMorning commented 3 months ago

If your creating a new project you could also try using ReactiveUI.SourceGenerators https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html

The manual way to create properties in ReactiveUI | An advanced, composable, reactive model-view-viewmodel framework

thank you, this solution is better.

The manual way to create properties in ReactiveUI | An advanced, composable, reactive model-view-viewmodel framework
github-actions[bot] commented 3 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.