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

Refactor/Docs not opening fixed. #5503

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

icanerdogan
Copy link

@icanerdogan icanerdogan commented Dec 3, 2024

🎯 Goal

The goal of this change is to fix a NullPointerException in the app, specifically caused by an attempt to invoke the toString() method on a null object. This was preventing the application from opening, causing it to crash immediately. After fixing this issue, the app is now able to open and function as expected.

🛠 Implementation details

The fix involved identifying the null object reference that caused the NullPointerException. By adding null checks and ensuring that the object is initialized before invoking any methods, we prevented the crash. The updated code now gracefully handles null values, allowing the app to proceed without errors.

🎨 UI Changes

There were no UI changes involved in this fix as it was related to backend functionality. However, the app's stability has significantly improved, leading to a better user experience.

Before After
Before After

No visible UI changes were made, but the app is now stable and can open without crashing.

🧪 Testing

This change can be tested by launching the app on a device or emulator and verifying that it no longer crashes on startup. If the app opens successfully and functions as expected, the issue has been resolved.

Provide a patch below if it is necessary for testing

Provide the patch summary here
            val appName = if (applicationInfo != null) {
                val stringId = applicationInfo.labelRes
                if (stringId == 0) {
                    applicationInfo.nonLocalizedLabel?.toString() ?: "UnknownApp"
                } else {
                    context.getString(stringId) ?: "UnknownApp"
                }
              } else { "UnknownApp" }

☑️Contributor Checklist

General

  • I have signed the Stream CLA (required)
  • Assigned a person / code owner group (required)
  • Thread with the PR link started in a respective Slack channel (#android-chat-core or #android-chat-ui) (required)
  • PR targets the develop branch
  • PR is linked to the GitHub issue it resolves

Code & documentation

  • Changelog is updated with client-facing changes
  • New code is covered by unit tests
  • Comparison screenshots added for visual changes
  • Affected documentation updated (KDocs, docusaurus, tutorial)

☑️Reviewer Checklist

  • UI Components sample runs & works
  • Compose sample runs & works
  • UI Changes correct (before & after images)
  • Bugs validated (bugfixes)
  • New feature tested and works
  • Release notes and docs clearly describe changes
  • All code we touched has new or updated KDocs

🎉 GIF

Please provide a suitable gif that describes your work on this pull request

@icanerdogan icanerdogan requested a review from a team as a code owner December 3, 2024 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant