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

Fix how highlights are handled #91

Merged
merged 1 commit into from
Feb 28, 2016
Merged

Fix how highlights are handled #91

merged 1 commit into from
Feb 28, 2016

Conversation

xPaw
Copy link
Member

@xPaw xPaw commented Feb 23, 2016

  • Partially fixes Actions containing Highlights display incorrectly #90 where highlighted actions were broken
  • Sent actions are correctly identified as self
  • Sent actions are correctly highlighted (previously this only worked when reloading from history)
  • Minor performance improvement where received messages are no longer split twice

@xPaw xPaw added the Type: Bug Issues that report and PRs that solve any defects that cause unexpected behaviors. label Feb 23, 2016
@maxpoulin64
Copy link
Member

This one seems to break notifications on highlight. I put my test instance on a random channel and highlighted myself, but I didn't get the desktop notification and the badge didn't turn white either. It just displayed as if it was any other non-highlight channel message.

I also noticed the line doesn't get colored at all, so it's not clear it's a highlight. It just stays orange.

Did I miss something? I did run npm run build before and cleared the browser cache.

@xPaw
Copy link
Member Author

xPaw commented Feb 25, 2016

Was there a .highlight class applied? Was it an action?

@maxpoulin64
Copy link
Member

Yes, the .highlight class gets applied properly. But with both actions and regular messages, no desktop notification gets received, and the badge doesn't turn white. With regular messages, the line does turn red as expected however.

<div class="msg message highlight">
    <span class="time">
        03:49
    </span>
    <span class="from">
        <a href="#" class="user" style="color: #ff514d">Max-P_test</a>
    </span>
    <span class="text">
            Max-P: That still works
    </span>
</div>
<div class="msg action highlight">
    <span class="time">
        03:48
    </span>
    <span class="from"></span>
    <span class="text">
        <a href="#" class="user">Max-P_test</a>

         highlights Max-P
    </span>
</div>

Switching back to master, it all works again.

@xPaw
Copy link
Member Author

xPaw commented Feb 25, 2016

This PR doesn't fix color on highlight (the other PR does), so that's fine. Unsure about notification though.

@maxpoulin64
Copy link
Member

Found it: highlight checked here and broken here

Since you're adding an highlight property it should be an easy fix actually.

@xPaw
Copy link
Member Author

xPaw commented Feb 25, 2016

Template adds the highlight class though, so that doesn't make sense.

@maxpoulin64
Copy link
Member

It's not checking the class, it's checking the message type directly from the server event.

@xPaw
Copy link
Member Author

xPaw commented Feb 25, 2016

Ah, my bad.

@xPaw
Copy link
Member Author

xPaw commented Feb 25, 2016

@maxpoulin64 Should be fixed now.

@maxpoulin64 maxpoulin64 self-assigned this Feb 26, 2016
@maxpoulin64
Copy link
Member

I confirm it works fine for me now, 👍

@maxpoulin64 maxpoulin64 mentioned this pull request Feb 28, 2016
@astorije
Copy link
Member

👍

astorije added a commit that referenced this pull request Feb 28, 2016
Fix how highlights are handled
@astorije astorije merged commit ce69ce3 into thelounge:master Feb 28, 2016
@xPaw xPaw deleted the fix-highlight branch March 7, 2016 17:17
@astorije astorije added this to the 1.3.0 milestone Apr 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issues that report and PRs that solve any defects that cause unexpected behaviors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Actions containing Highlights display incorrectly
3 participants