Skip to content

Commit

Permalink
Migrate to v10
Browse files Browse the repository at this point in the history
  • Loading branch information
DFreds committed Sep 4, 2022
1 parent bcbd7bb commit 7f2cf75
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Become a patron](https://github.com/codebard/patron-button-and-widgets-by-codebard/blob/master/images/become_a_patron_button.png?raw=true)](https://www.patreon.com/dfreds)
<a href="https://www.buymeacoffee.com/dfreds" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>

![Foundry Version](https://img.shields.io/badge/Foundry-v9-informational)
![Foundry Version](https://img.shields.io/badge/Foundry-v10-informational)
![Forge Installs](https://img.shields.io/badge/dynamic/json?label=Forge%20Installs&query=package.installs&suffix=%25&url=https://forge-vtt.com/api/bazaar/package/dfreds-chat-pins&colorB=4aa94a)
![Latest Release Download Count](https://img.shields.io/github/downloads/dfreds/dfreds-chat-pins/latest/dfreds-chat-pins.zip)
![All Downloads](https://img.shields.io/github/downloads/dfreds/dfreds-chat-pins/total)
Expand Down
9 changes: 6 additions & 3 deletions module.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "dfreds-chat-pins",
"id": "dfreds-chat-pins",
"title": "DFreds Chat Pins",
"description": "A FoundryVTT module that allows pinning messages to the chat.",
"author": "DFreds",
Expand All @@ -17,8 +17,11 @@
"changelog": "https://github.com/DFreds/dfreds-chat-pins/releases",
"flags": {},
"version": "1.0.0",
"minimumCoreVersion": "0.8.6",
"compatibleCoreVersion": "9",
"compatibility": {
"minimum": 10,
"verified": "10.284",
"maximum": 10
},
"scripts": [],
"esmodules": ["./scripts/main.js"],
"styles": ["./styles/dfreds-chat-pins.css"],
Expand Down
9 changes: 3 additions & 6 deletions scripts/chat-pins-log.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,7 @@ export default class ChatPinsLog extends Application {

// Track internal flags
if (!this._lastId) this._lastId = message.id; // Ensure that new messages don't result in batched scrolling
if (
(message.data.whisper || []).includes(game.user.id) &&
!message.isRoll
) {
if ((message.whisper || []).includes(game.user.id) && !message.isRoll) {
this._lastWhisper = message;
}

Expand Down Expand Up @@ -193,9 +190,9 @@ export default class ChatPinsLog extends Application {
const messages = this.element.find('#chat-pins-log .message');
for (let li of messages) {
const message = game.messages.get(li.dataset['messageId']);
if (!message?.data.timestamp) return;
if (!message?.timestamp) return;
const stamp = li.querySelector('.message-timestamp');
stamp.textContent = foundry.utils.timeSince(message.data.timestamp);
stamp.textContent = foundry.utils.timeSince(message.timestamp);
}
}

Expand Down

0 comments on commit 7f2cf75

Please sign in to comment.