Ofir Bar
02/17/2020, 9:46 AMElvis operator always returns the left operand of non-nullable String
for the 2nd attempt (marked yellow):
condition currentUser?.office?.name.toString() is always 'true'
Why is that not possible to be null?Kiss Budai Matyas
02/17/2020, 9:48 AMnull
. You should have …name?.toString()
Ofir Bar
02/17/2020, 9:48 AM,
does?Kiss Budai Matyas
02/17/2020, 9:49 AMOfir Bar
02/17/2020, 9:50 AM<string name="main_profile_lawyer_title">עו"ד %1$s %2$s</string>
fpTitleTextView.text = getString(R.string.main_profile_lawyer_title,currentUser?.firstName, currentUser?.lastName) ?: "SOME DEFAULT STRING"
The elvis for “SOME DEFAULT STRING” is grayed out.