MCPcopy Create free account
hub / github.com/firebase/codelab-friendlychat-web / checkSignedInWithMessage

Function checkSignedInWithMessage

web-start/src/index.js:179–192  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

177
178// Returns true if user is signed-in. Otherwise false and displays a message.
179function checkSignedInWithMessage() {
180 // Return true if the user is signed in Firebase
181 if (isUserSignedIn()) {
182 return true;
183 }
184
185 // Display a message to the user using a Toast.
186 var data = {
187 message: 'You must sign-in first',
188 timeout: 2000,
189 };
190 signInSnackbarElement.MaterialSnackbar.showSnackbar(data);
191 return false;
192}
193
194// Resets the given MaterialTextField.
195function resetMaterialTextfield(element) {

Callers 2

onMediaFileSelectedFunction · 0.70
onMessageFormSubmitFunction · 0.70

Calls 1

isUserSignedInFunction · 0.70

Tested by

no test coverage detected