Comments (7)
Can you send me the screenshot of the code itself where the Lint is giving warnings?
from mynotes.
of Course
from mynotes.
As far as the dispatcher warnings are concerned I believe they are false alarms because dispatcher.main
is essentially Dispatcher.Main
. Injecting Dispatchers is necessary to make Concerned ViewModel testable.
How you wish to tackle the suspending function should not be called from a different dispatcher warning
?
from mynotes.
you don't need a dispatcher in viewModelScope.launch to call a suspend function, I removed the dispatchers and the app worked normally, you can check here ( S6307: Suspending functions should be main-safe )
Notice that the getTask method doesn't show the dispatcher's lint warning because it doesn't call a suspend function
from mynotes.
Try running the tests in AllTasksVMTest
class and you will see they will all fail. For writing unit tests for functions which use viewModelScope
it's necessary to provide a test dispatcher as Main Looper which is used by Dispatcher.Main is not available for unit tests.
One can also hack the dispatcher by using Dispatcher.setMain but injecting dispatchers is the recommended way.
from mynotes.
Ok, i will not work on dispatchers
but i found a bug when keyboar stays over the sanckbar when the user, dont select a deadline, can i work on this ?
Screenrecorder-2022-10-08-12-13-28-718.mp4
from mynotes.
Yes this looks like a valid issue. Please raise another issue and I'll assign that to you
from mynotes.
Related Issues (20)
- Replace Toast with Snackbar HOT 1
- Implement Undo When Deleting a Task HOT 6
- Add BaseFragment and BaseActivity
- Add Up Button in the Action Bar for AllTasksFragment HOT 17
- Implement Animations for various transitions HOT 14
- Adding frequency in Note HOT 1
- Improve the overall UI of the app HOT 16
- Set a custom color by note HOT 11
- Improve ui HOT 8
- Parcelable vs Serializable HOT 1
- Add Confirmation Dialog HOT 2
- Add Splash Screen HOT 6
- Improve UX Design of the Add task screen HOT 2
- Bug Keyboard over snackbar HOT 1
- Update Demo Video in Readme HOT 4
- change gradle version HOT 1
- Automated testing HOT 2
- Dispatcher Dependency
- Crash while applying "Sort By Deadline" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mynotes.