Skip to content

Commit

Permalink
style: update ux for hosted demo (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
darryncampbell-pubnub authored Oct 24, 2023
1 parent 2eb5af8 commit 4f86e9a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions samples/react-native-group-chat/app.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"expo": {
"name": "react-native-group-chat",
"name": "Chat SDK",
"slug": "react-native-group-chat",
"version": "1.0.0",
"orientation": "portrait",
Expand All @@ -14,14 +14,14 @@
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.pubnub.chat-sdk"
"bundleIdentifier": "com.pubnub.chatsdk"
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#ffffff"
},
"package": "com.piotr.suwala.reactnativegroupchat"
"package": "com.pubnub.chatsdk"
},
"web": {
"favicon": "./assets/favicon.png"
Expand Down
Binary file modified samples/react-native-group-chat/assets/adaptive-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified samples/react-native-group-chat/assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { RootStackParamList } from "../../../types"
import ChatIcon from "../../../assets/chat.svg"

export function LoginScreen({ navigation }: StackScreenProps<RootStackParamList, "login">) {
const [name, setName] = useState("test-user")
const [name, setName] = useState("test-user-" + Math.floor(Math.random() * 999))

return (
<KeyboardAvoidingView
Expand All @@ -28,7 +28,7 @@ export function LoginScreen({ navigation }: StackScreenProps<RootStackParamList,
</Text>
<Gap value={96} />

<TextInput label="User ID" value={name} onChangeText={setName} />
<TextInput label="Choose a User ID / Name" value={name} onChangeText={setName} />
<Gap value={96} />

<Button size="md" onPress={() => navigation.replace("mainRoutes", { name })}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ export function NewChatScreen({ navigation }: StackScreenProps<HomeStackParamLis
<Gap value={20} />

<FlatList
data={users.filter((user) => user.name?.toLowerCase().includes(searchText.toLowerCase()))}
data={users
.sort((a, b) => b.lastActiveTimestamp - a.lastActiveTimestamp)
.filter((user) => user.name?.toLowerCase().includes(searchText.toLowerCase()))}
renderItem={({ item: user }) => (
<ListItem
avatar={<Avatar source={user} showIndicator />}
Expand Down

0 comments on commit 4f86e9a

Please sign in to comment.