Skip to content

Commit

Permalink
Optimize cloneInContext (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacSweers committed Mar 29, 2023
1 parent 13e9ba7 commit 41591d7
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ internal class `-ViewPumpLayoutInflater`(
}

override fun cloneInContext(newContext: Context): LayoutInflater {
if (newContext == context) {
// Same context, use the same inflater
return this
}
return `-ViewPumpLayoutInflater`(this, newContext, true)
}

Expand Down

0 comments on commit 41591d7

Please sign in to comment.