Skip to content

Commit

Permalink
fix: merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammeds1992 committed Jul 17, 2023
2 parents dfab492 + a68b54a commit e6fcac1
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 17 deletions.
25 changes: 25 additions & 0 deletions packages/uiweb/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

## [1.1.1](https://github.com/ethereum-push-notification-service/push-sdk/compare/uiweb-1.1.0...uiweb-1.1.1) (2023-07-17)


### Bug Fixes

* fixed build issues ([#550](https://github.com/ethereum-push-notification-service/push-sdk/issues/550)) ([0ce6e18](https://github.com/ethereum-push-notification-service/push-sdk/commit/0ce6e18a82901478fe3157788c716e5224f14bdb))
* Merge branch 'main' into deployment ([2e2c904](https://github.com/ethereum-push-notification-service/push-sdk/commit/2e2c904040260726d5c5087aed6e33d0d722a0f4))



# [1.1.0](https://github.com/ethereum-push-notification-service/push-sdk/compare/uiweb-1.0.2...uiweb-1.1.0) (2023-07-14)


### Bug Fixes

* fixed issue with build uiweb ([#541](https://github.com/ethereum-push-notification-service/push-sdk/issues/541)) ([3e00f81](https://github.com/ethereum-push-notification-service/push-sdk/commit/3e00f81af99de5bee468c3320062aec243708798))


### Features

* add video sdk methods ([#395](https://github.com/ethereum-push-notification-service/push-sdk/issues/395)) ([4b9dd69](https://github.com/ethereum-push-notification-service/push-sdk/commit/4b9dd691ac1fde6a91be0478b20780f6755fbb4f)), closes [#295](https://github.com/ethereum-push-notification-service/push-sdk/issues/295) [#309](https://github.com/ethereum-push-notification-service/push-sdk/issues/309) [#357](https://github.com/ethereum-push-notification-service/push-sdk/issues/357) [#295](https://github.com/ethereum-push-notification-service/push-sdk/issues/295)
* chat widget component ([#386](https://github.com/ethereum-push-notification-service/push-sdk/issues/386)) ([93a8fd8](https://github.com/ethereum-push-notification-service/push-sdk/commit/93a8fd8b41831ab61931336044a8f66cb9453edd)), closes [#460](https://github.com/ethereum-push-notification-service/push-sdk/issues/460)



## [1.0.2](https://github.com/ethereum-push-notification-service/push-sdk/compare/uiweb-1.0.1...uiweb-1.0.2) (2023-05-13)


Expand Down
2 changes: 1 addition & 1 deletion packages/uiweb/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pushprotocol/uiweb",
"version": "1.0.2",
"version": "1.1.1",
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ export const ChatsFeedList = () => {
useEffect(() => {
if (
!isInViewport1 ||
loading ||
Object.keys(chatsFeed).length < chatLimit
loading
// ||
// Object.keys(chatsFeed).length < chatLimit
) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ export const RequestsFeedList = () => {
useEffect(() => {
if (
!isInViewport1 ||
loading ||
Object.keys(requestsFeed).length < requestLimit
loading
// ||
// Object.keys(requestsFeed).length < requestLimit
) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export const InboxNotificationFeedList = () => {
}, [fetchNotification, env, page, account]);

useEffect(() => {

if (
!isInViewport1 ||
loading
Expand Down
5 changes: 3 additions & 2 deletions packages/uiweb/src/lib/components/notification/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ import { LinkIcon } from "../../icons/Link";
import { useDivOffsetWidth } from "../../hooks";

import type { INotificationItemTheme} from './theme';
import { getCustomTheme, lightTheme } from './theme';
export {lightTheme as notificationLightTheme,darkTheme as notificationDarkTheme,baseTheme as notificationBaseTheme,INotificationItemTheme} from './theme';
import { getCustomTheme } from './theme';
export {lightTheme as notificationLightTheme,darkTheme as notificationDarkTheme,baseTheme as notificationBaseTheme, type INotificationItemTheme} from './theme';

// ================= Define types
export type chainNameType =
| 'ETH_TEST_GOERLI'
Expand Down
1 change: 0 additions & 1 deletion packages/uiweb/src/lib/hooks/chat/useFetchRequests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ const useFetchRequests = () => {

//conversation to map from array
const modifiedRequestsObj: ChatFeedsType= {};

for (const request of requests) {
if(!request?.groupInformation)
modifiedRequestsObj[request.did.toLowerCase() ?? request.chatId] = request;
Expand Down
1 change: 0 additions & 1 deletion packages/uiweb/src/lib/hooks/chat/useIsInViewport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export function useIsInViewport(element: any, rootMargin: any) {
useEffect(() => {
const observer = new IntersectionObserver(
([entry]) => {

setState(entry.isIntersecting);
},
{ rootMargin }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,15 @@ const useChatNotificationSocket = ({
pushChatNotificationSocket?.on(EVENTS.USER_FEEDS, (feedItem: any) => {
const parseApiResponse = convertReponseToParsedArray([feedItem]);
if (subscriptionStatus.get(parseApiResponse[0].channel)) {
setInboxNotifFeed(`notif${parseApiResponse[0].sid}`, parseApiResponse[0]);
} else setSpamNotifFeed(`notif${parseApiResponse[0].sid}`, parseApiResponse[0]);
setInboxNotifFeed(
`notif${parseApiResponse[0].sid}`,
parseApiResponse[0]
);
} else
setSpamNotifFeed(
`notif${parseApiResponse[0].sid}`,
parseApiResponse[0]
);

setNotificationFeedSinceLastConnection(feedItem);
});
Expand All @@ -110,7 +117,7 @@ const useChatNotificationSocket = ({
return;
}
const chatId = getChatId({ msg: chat, account }).toLowerCase();

if (!isPCAIP(chatId)) return;
if (
chat.messageCategory === 'Request' &&
chat.messageContent === null &&
Expand All @@ -122,7 +129,6 @@ const useChatNotificationSocket = ({
if (user || Object.keys(user || {}).length) {
let newOne: IFeeds = {} as IFeeds;
newOne = chatsFeed[chatId];
console.log(user)
newOne['publicKey'] = user!.publicKey;

setChatFeed(chatId, newOne);
Expand Down Expand Up @@ -167,12 +173,15 @@ console.log(user)
const fetchedChat: IFeeds = (await fetchChat({
recipientAddress: chatId,
})) as IFeeds;
console.log(chatId)
if (Object.keys(fetchedChat || {}).length &&checkIfIntent({ chat: fetchedChat, account }))
console.log(chatId);
if (
Object.keys(fetchedChat || {}).length &&
checkIfIntent({ chat: fetchedChat, account })
)
setRequestFeed(chatId, fetchedChat);
else setChatFeed(chatId, fetchedChat);
console.log("in here")
console.log(msg)
console.log('in here');
console.log(msg);
setChat(chatId, {
messages: Array.isArray(chats.get(chatId)?.messages)
? [...chats.get(chatId)!.messages, msg]
Expand Down
1 change: 1 addition & 0 deletions packages/uiweb/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"noImplicitOverride": true,
// "importsNotUsedAsValues": "error",
"noPropertyAccessFromIndexSignature": true,
// "isolatedModules": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
},
Expand Down

0 comments on commit e6fcac1

Please sign in to comment.