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

Add DiffUtil Callback #59

Merged
merged 4 commits into from Mar 24, 2024
Merged

Add DiffUtil Callback #59

merged 4 commits into from Mar 24, 2024

Conversation

amirisback
Copy link
Owner

No description provided.

@amirisback amirisback self-assigned this Mar 24, 2024
@amirisback amirisback added the enhancement New feature or request label Mar 24, 2024
@amirisback amirisback merged commit 5c5b1e6 into master Mar 24, 2024
3 checks passed
abstract class FrogoRecyclerViewAdapter<T> :
RecyclerView.Adapter<FrogoRecyclerViewHolder<T>>() {

abstract class FrogoRecyclerViewAdapter<T> : CoreFrogoRecyclerViewAdapter<T, FrogoRecyclerViewHolder<T>>() {

Check warning

Code scanning / detekt

Too many functions inside a/an file/class/object/interface always indicate a violation of the single responsibility principle. Maybe the file/class/object/interface wants to manage too many things at once. Extract functionality which clearly belongs together. Warning

Class 'FrogoRecyclerViewAdapter' with '21' functions detected. Defined threshold inside classes is set to '11'
*/
interface IFrogoSingleRvBinding<T, VB : ViewBinding> {

interface IFrogoRvSingleton<T> {

Check warning

Code scanning / detekt

Too many functions inside a/an file/class/object/interface always indicate a violation of the single responsibility principle. Maybe the file/class/object/interface wants to manage too many things at once. Extract functionality which clearly belongs together. Warning

Interface 'IFrogoRvSingleton' with '21' functions detected. Defined threshold inside interfaces is set to '11'
*/


abstract class CoreFrogoRecyclerViewAdapter<T, VH : CoreFrogoRecyclerViewHolder<T>> : RecyclerView.Adapter<VH>() {

Check warning

Code scanning / detekt

Too many functions inside a/an file/class/object/interface always indicate a violation of the single responsibility principle. Maybe the file/class/object/interface wants to manage too many things at once. Extract functionality which clearly belongs together. Warning

Class 'CoreFrogoRecyclerViewAdapter' with '15' functions detected. Defined threshold inside classes is set to '11'
* Base Of Core FrogoRecyclerViewHolder
*/

protected var notifyListener = object : FrogoRecyclerNotifyListener<T> {

Check warning

Code scanning / detekt

Too many functions inside a/an file/class/object/interface always indicate a violation of the single responsibility principle. Maybe the file/class/object/interface wants to manage too many things at once. Extract functionality which clearly belongs together. Warning

Object 'null' with '11' functions detected. Defined threshold inside objects is set to '11'
@@ -20,7 +20,8 @@
* com.frogobox.recycler
*
*/
open class FrogoSingleRv<T> : FrogoSingleRvBase<T>(), IFrogoSingleRv<T> {

open class FrogoSingleRv<T> : FrogoSingleRvBase<T>(), IFrogoRv<T> {

Check warning

Code scanning / detekt

Too many functions inside a/an file/class/object/interface always indicate a violation of the single responsibility principle. Maybe the file/class/object/interface wants to manage too many things at once. Extract functionality which clearly belongs together. Warning

Class 'FrogoSingleRv' with '27' functions detected. Defined threshold inside classes is set to '11'
@@ -0,0 +1,154 @@
package com.frogobox.recycler.core

Check warning

Code scanning / detekt

Checks whether files end with a line separator. Warning

The file /home/runner/work/frogo-recycler-view/frogo-recycler-view/frogorecyclerview/src/main/java/com/frogobox/recycler/core/CoreFrogoRecyclerViewAdapter.kt is not ending with a new line.
}
})

open fun adapterAreItemsTheSame(oldItem: T & Any, newItem: T & Any): Boolean {

Check warning

Code scanning / detekt

A function that only returns a constant is misleading. Consider declaring a constant instead Warning

is returning a constant. Prefer declaring a constant instead.
return false
}

open fun adapterAreContentsTheSame(oldItem: T & Any, newItem: T & Any): Boolean {

Check warning

Code scanning / detekt

A function that only returns a constant is misleading. Consider declaring a constant instead Warning

is returning a constant. Prefer declaring a constant instead.

/*
/**

Check warning

Code scanning / detekt

An abstract class is unnecessary and can be refactored. An abstract class should have both abstract and concrete properties or functions. An abstract class without a concrete member can be refactored to an interface. An abstract class without an abstract member can be refactored to a concrete class. Warning

An abstract class without an abstract member can be refactored to a concrete class.
@@ -0,0 +1,24 @@
package com.frogobox.recycler.core

Check warning

Code scanning / detekt

Checks whether files end with a line separator. Warning

The file /home/runner/work/frogo-recycler-view/frogo-recycler-view/frogorecyclerview/src/main/java/com/frogobox/recycler/core/FrogoDiffUtilCallback.kt is not ending with a new line.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

None yet

1 participant