8000 `onDragging` calls local cache redundantly · Issue #1292 · team113/messenger · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
onDragging calls local cache redundantly #1292
Closed
@ChabanovX

Description

@ChabanovX

Summary

In lib/ui/page/home/page/my_profile/view.dart _storage implementation FlutterSlider widget has parameter onDragging, which sets new values to local cache on each event. There might be tens or hundreds of such events.

Steps to reproduce

Start dragging Storage FlutterSlider in my_profile page

What is the current bug behavior?

Slider sends unnecessary events to local cache for updating cache value.

What is the expected correct behavior?

Slider should send events only via onDragCompleted event.

Relevant logs and/or screenshots

Questionable chunk of code in file lib/ui/page/home/page/my_profile/view.dart:

onDragging: (i, lower, upper) {
              if (lower is double) {
                if (lower == 64.0 * GB) {
                  CacheWorker.instance.setMaxSize(null);
                } else {
                  CacheWorker.instance.setMaxSize(lower.round());
                }
              }
            },
Screen.Recording.2025-06-24.at.16.08.00.mov

Possible fixes

Remove onDragging parameter

Metadata

Metadata

Labels

bugBugs and incorrectness problemsk::performanceApplication performance related changes

Type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0