Skip to content

Commit

Permalink
Removed legacy code
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian-Webster committed Feb 16, 2024
1 parent 5ca5575 commit 832d7bc
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 446 deletions.
37 changes: 6 additions & 31 deletions components/Content_ChatInformationScreen.js
Original file line number Diff line number Diff line change
@@ -1,42 +1,17 @@
import React, { useState } from 'react';
import { StyleSheet, Text, View, Button, Image, TouchableOpacity, SafeAreaView, ScrollView, FlatList} from 'react-native';
import { StatusBar } from 'expo-status-bar';
import Constants from "expo-constants";
import styled from "styled-components";
import Images from "../posts/images.js";
import Post from "../posts/post.js";
import SwitchToggle from "react-native-switch-toggle";
import {
darkModeStyling,
darkModeOn,
lightModeStyling,
TestText,
ChatScreenInformation_Title,
BackgroundDarkColor,
Navigator_BackButton,
SubTitle,
FlexRow,
StyledButton,
ButtonText,
FlexRow_WithoutJustifyContent,
Colors
} from '../screens/screenStylings/styling.js';
import MemberRow from '../components/MemberRow_ChatInformationScreen.js';
import React from 'react';
import { Image, TouchableOpacity} from 'react-native';

import { useTheme } from '@react-navigation/native';


const Content = ({navigation}, props) => {
if (darkModeOn === true) {
var styling = darkModeStyling;
} else {
var styling = lightModeStyling;
}
const {darkest} = Colors;
const {colors} = useTheme();
const {source_for_image} = props;
return(
<TouchableOpacity onPress={() => {alert("Coming soon")}}>
<Image
source={source_for_image || require('../assets/icomoon-icons/IcoMoon-Free-master/PNG/64px/266-question.png')}
style={source_for_image ? {minHeight: 60, minWidth: 60, width: 60, height: 60, maxWidth: 60, maxHeight: 60, borderWidth: 8, borderColor: darkest} : {minHeight: 60, minWidth: 60, width: 60, height: 60, maxWidth: 60, maxHeight: 60}}
style={source_for_image ? {minHeight: 60, minWidth: 60, width: 60, height: 60, maxWidth: 60, maxHeight: 60, borderWidth: 8, borderColor: colors.darkest} : {minHeight: 60, minWidth: 60, width: 60, height: 60, maxWidth: 60, maxHeight: 60}}
resizeMode="cover"
resizeMethod="resize"
/>
Expand Down
23 changes: 3 additions & 20 deletions components/MemberRow_ChatInformationScreen.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,9 @@
import React, { useState } from 'react';
import { StyleSheet, Text, View, Button, Image, TouchableOpacity, SafeAreaView, ScrollView, FlatList} from 'react-native';
import { StatusBar } from 'expo-status-bar';
import Constants from "expo-constants";
import styled from "styled-components";
import Images from "../posts/images.js";
import Post from "../posts/post.js";
import SwitchToggle from "react-native-switch-toggle";
import React from 'react';
import { Image} from 'react-native';
import {useTheme} from "@react-navigation/native";
import {
darkModeStyling,
darkModeOn,
lightModeStyling,
TestText,
ChatScreenInformation_Title,
BackgroundDarkColor,
Navigator_BackButton,
SubTitle,
FlexRow,
StyledButton,
ButtonText,
FlexRow_NOJustifyContent,
Colors
FlexRow_NOJustifyContent
} from '../screens/screenStylings/styling.js';


Expand Down
22 changes: 1 addition & 21 deletions navigation/StackNavigator.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
import React, {useContext} from "react";
import { createStackNavigator } from "@react-navigation/stack";
import { StyleSheet, Text, View, Button, Image, TouchableOpacity, SafeAreaView, ScrollView} from 'react-native';
import {darkModeStyling, darkModeOn, lightModeStyling} from '../screens/screenStylings/styling.js';

import {Colors} from '../screens/screenStylings/styling.js'
const {primary, tertiary} = Colors;

import { ExperimentalFeaturesEnabledContext } from "../components/ExperimentalFeaturesEnabledContext.js";

import ProfileScreen from "../screens/ProfileScreen";
import SettingsScreen from "../screens/SettingsScreen";
import HomeScreen from "../screens/HomeScreen";
import LoginScreen from "../screens/LoginScreen";
import AccountSettings from "../screens/AccountSettings";
import Signup from "../screens/Signup.js";

import { CredentialsContext } from "../components/CredentialsContext.js";
import { NavigationContainer, useTheme } from '@react-navigation/native';
import { useTheme } from '@react-navigation/native';
import FindScreen from "../screens/FindScreen.js";
import ProfilePages from '../screens/ProfilePages.js'

Expand All @@ -31,7 +23,6 @@ import SelectCategorySearchScreen from '../screens/SelectCategorySearchScreen'
import AccountBadges from "../screens/AccountBadges.js";
import ChangeEmailPage from "../screens/ChangeEmailPage";

import Conversations from "../screens/Conversations.js";
import RecordAudioPage from "../screens/PostScreens/RecordAudioPage.js";
import SendAudioPage from "../screens/PostScreens/SendAudioPage.js";

Expand Down Expand Up @@ -64,8 +55,6 @@ import HomeScreenSettings from "../screens/HomeScreenSettings.js";
import Filter_HomeScreenSettings from "../screens/HomeScreenSettings/Filter_HomeScreenSettings.js";
import Algorithm_HomeScreenSettings from "../screens/HomeScreenSettings/Algorithm_HomeScreenSettings.js";
import Audio_HomeScreenSettings from "../screens/HomeScreenSettings/Audio_HomeScreenSettings.js";
import CreateConversationSelection from "../screens/CreateConversationSelection.js";
import ConversationCreationPage from "../screens/CreateConversation.js";
import ChangePasswordScreen from "../screens/ChangePasswordScreen.js";
import EditProfile from "../screens/EditProfile.js";
import AccountFollowRequestsScreen from "../screens/AccountFollowRequestsScreen.js";
Expand All @@ -75,7 +64,6 @@ import ActivateEmailMFA from "../screens/SecuritySettingsScreens/MFAScreens/Acti
import VerifyEmailScreen from "../screens/VerifyEmailScreen.js";
import VerifyEmailCodeScreen from "../screens/VerifyEmailCodeScreen.js";
import DataControl from "../screens/SecuritySettingsScreens/DataControl.js";
import DeleteAccountConfirmation from "../screens/DeleteAccountConfirmation.js";
import ExperimentalFeatures from "../screens/ExperimentalFeatures.js";
import ActivityScreen from "../screens/ActivityScreen.js";
import PrivacySettings from "../screens/PrivacySettings.js";
Expand All @@ -88,14 +76,6 @@ import PollVoteViewPage from "../screens/PollVoteViewPage.js";

const Stack = createStackNavigator();

const screenOptionStyle = {
headerStyle: {
backgroundColor: "#9AC4F8",
},
headerTintColor: "white",
headerBackTitle: "Back",
};

const RootStack = () => {
const { colors } = useTheme();
return(
Expand Down
4 changes: 1 addition & 3 deletions navigation/Start_Stack.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import React, {useEffect, useState} from "react";
import React, {useState} from "react";
import { createStackNavigator } from "@react-navigation/stack";
import { StyleSheet, Text, View, Button, Image, TouchableOpacity, SafeAreaView, ScrollView} from 'react-native';
import {darkModeStyling, darkModeOn, lightModeStyling} from '../screens/screenStylings/styling.js';

import {Colors} from '../screens/screenStylings/styling.js'
const {primary, tertiary} = Colors;
Expand Down
92 changes: 4 additions & 88 deletions screens/HomeScreen.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import React, { useState, useContext, useRef, useEffect, useCallback, memo, useReducer } from 'react';
import { StyleSheet, Text, View, Button, Image, TouchableOpacity, SafeAreaView, ScrollView, FlatList, Alert, useWindowDimensions, Animated, ActivityIndicator, TouchableWithoutFeedback, RefreshControl} from 'react-native';
import React, { useState, useContext, useRef, useEffect } from 'react';
import { Text, View, Image, TouchableOpacity, ScrollView, FlatList, ActivityIndicator, TouchableWithoutFeedback, RefreshControl} from 'react-native';
import { StatusBar } from 'expo-status-bar';
import AsyncStorage from '@react-native-async-storage/async-storage';
import { useTheme, useFocusEffect, useIsFocused, CommonActions } from '@react-navigation/native';
import { useTheme } from '@react-navigation/native';
import Icon from 'react-native-vector-icons/Ionicons';
import {
darkModeStyling,
darkModeOn,
lightModeStyling,
ProfileOptionsView,
ProfileOptionsViewText,
ProfileOptionsViewSubtitleText,
Expand All @@ -18,81 +15,16 @@ import {
ReportProfileOptionsViewButtonsText,
ReportProfileOptionsViewSubtitleText,
ReportProfileOptionsViewText,
InnerContainer,
PageTitle,
SubTitle,
StyledFormArea,
StyledButton,
ButtonText,
Line,
WelcomeContainer,
WelcomeImage,
Avatar,
Colors,
StyledContainer,
ProfileHorizontalView,
ProfileHorizontalViewItem,
ProfIcons,
ProfInfoAreaImage,
ProfileBadgesView,
ProfileBadgeIcons,
ProfilePostsSelectionView,
ProfilePostsSelectionBtns,
ProfileGridPosts,
ProfileFeaturedPosts,
ProfileTopBtns,
TopButtonIcons,
ProfileSelectMediaTypeItem,
ProfileSelectMediaTypeHorizontalView,
ProfileSelectMediaTypeIcons,
ProfileSelectMediaTypeIconsBorder,
PollPostFrame,
PollPostTitle,
PollPostSubTitle,
PollBarOutline,
PollBarItem,
PollKeyViewOne,
PollKeyViewTwo,
PollKeyViewThree,
PollKeyViewFour,
PollKeyViewFive,
PollKeyViewSix,
PollKeysCircle,
PollPostHorizontalView,
PollPostIcons,
AboveBarPollPostHorizontalView,
BottomPollPostHorizontalView,
LikesView,
CommentsView,
PollBottomItem,
MultiMediaPostFrame,
ImagePostFrame,
PostCreatorIcon,
PostsHorizontalView,
PostsVerticalView,
PostHorizontalView,
PostsIcons,
PostsIconFrame,
MsgBox,
ImagePostTextFrame,
SearchFrame,
SearchHorizontalView,
SearchHorizontalViewItem,
SearchHorizontalViewItemCenter,
SearchSubTitle,
ConfirmLogoutButtons,
ConfirmLogoutButtonText,
ViewHider,
} from '../screens/screenStylings/styling.js';
import { CredentialsContext } from '../components/CredentialsContext.js';
import { AdIDContext } from '../components/AdIDContext.js';
import { Audio } from 'expo-av';
import { SimpleStylingVersion } from '../components/StylingVersionsFile.js';
import { AppStylingContext } from '../components/AppStylingContext.js';
import axios from 'axios';
import { ProfilePictureURIContext } from '../components/ProfilePictureURIContext.js';
import { ServerUrlContext } from '../components/ServerUrlContext.js';
import SocialSquareLogo_B64_png from '../assets/SocialSquareLogo_Base64_png.js';
import { BadgeEarntNotificationContext } from '../components/BadgeEarntNotificationContext.js';
import * as Haptics from 'expo-haptics';

Expand All @@ -105,39 +37,23 @@ import PollPost from '../components/Posts/PollPost.js';
import ThreadPost from '../components/Posts/ThreadPost.js';
import { StatusBarHeightContext } from '../components/StatusBarHeightContext.js';
import ThreeDotMenuActionSheet from '../components/Posts/ThreeDotMenuActionSheet.js';
import { BannerAd, BannerAdSize } from 'react-native-google-mobile-ads';
import ParseErrorMessage from '../components/ParseErrorMessage.js';
import AppBannerAd from '../components/ads/AppBannerAd.js';

const {brand, primary, tertiary, greyish, darkLight, darkestBlue, slightlyLighterPrimary, slightlyLighterGrey, descTextColor, darkest, red, orange, yellow, green, purple} = Colors;

const HomeScreen = ({navigation, route}) => {
const [followingFeed, dispatchFollowingFeed] = usePostReducer()
const [forYouFeed, dispatchForYouFeed] = usePostReducer();
console.log('Refresh items:', followingFeed.refreshItems)
// Filter code
const [showPhotos, setShowPhotos] = useState(undefined);
const [showVideos, setShowVideos] = useState(undefined);
const [showAudio, setShowAudio] = useState(undefined);
const [showThreads, setShowThreads] = useState(undefined);
const [showPolls, setShowPolls] = useState(undefined);
const [showCategories, setShowCategories] = useState(undefined);
const [PlayVideoSoundInSilentMode, setPlayVideoSoundInSilentMode] = useState(undefined)
const OutputAsyncStorageToConsole = false
const [updateSimpleStylesWarningHidden, setUpdateSimpleStylesWarningHidden] = useState(true);
const {AppStylingContextState, setAppStylingContextState} = useContext(AppStylingContext);
const adContent = `<iframe data-aa='1882208' src='https://ad.a-ads.com/1882208?size=300x250' style='width:300px; height:250px; border:0px; padding:0; overflow:hidden; background-color: transparent;'></iframe>`
const {profilePictureUri, setProfilePictureUri} = useContext(ProfilePictureURIContext);
const [usernameToReport, setUsernameToReport] = useState(null);
const [postEncrypted, setPostEncrypted] = useState(null);
const [ProfileOptionsViewState, setProfileOptionsViewState] = useState(true);
const {storedCredentials, setStoredCredentials} = useContext(CredentialsContext);
const [postSent, setPostSent] = useState(null);
const StatusBarHeight = useContext(StatusBarHeightContext);
async function unloadAudioFunction() {
playRecording.unloadAsync;
}
if (storedCredentials) {var {name, displayName, _id} = storedCredentials} else {var {name, displayName, _id} = {name: 'SSGUEST', displayName: 'SSGUEST', _id: 'SSGUEST'}}
if (storedCredentials) {var {_id} = storedCredentials} else {var {_id} = {_id: 'SSGUEST'}}
const {serverUrl, setServerUrl} = useContext(ServerUrlContext);
const {badgeEarntNotification, setBadgeEarntNotification} = useContext(BadgeEarntNotificationContext);
const {allCredentialsStoredList, setAllCredentialsStoredList} = useContext(AllCredentialsStoredContext);
Expand Down
15 changes: 1 addition & 14 deletions screens/NotificationsSettingsScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@ import { StatusBar } from 'expo-status-bar';
import {
WelcomeContainer,
Avatar,
SettingsPageItemTouchableOpacity,
SettingsItemImage,
SettingsItemText,
ConfirmLogoutView,
ConfirmLogoutText,
ConfirmLogoutButtons,
ConfirmLogoutButtonText,
darkModeOn,
darkModeStyling,
lightModeStyling,
BackgroundDarkColor,
TestText,
TextLink,
Expand All @@ -22,14 +12,11 @@ import {
ButtonText
} from '../screens/screenStylings/styling.js';
import {useTheme} from "@react-navigation/native";
import { ImageBackground, ScrollView, Text, TouchableOpacity, View, Image, Switch, ActivityIndicator, Alert } from 'react-native';
import { ScrollView, Text, TouchableOpacity, View, Switch, ActivityIndicator } from 'react-native';
import { ProfilePictureURIContext } from '../components/ProfilePictureURIContext.js';
import AsyncStorage from '@react-native-async-storage/async-storage';
import { CredentialsContext } from '../components/CredentialsContext';
import * as Notifications from 'expo-notifications';
import * as Linking from 'expo-linking';
import * as IntentLauncher from 'expo-intent-launcher';
import AppCredits from '../components/AppCredits.js';
import axios from 'axios';
import Ionicons from 'react-native-vector-icons/Ionicons';
import { ServerUrlContext } from '../components/ServerUrlContext.js';
Expand Down
48 changes: 2 additions & 46 deletions screens/PostScreens/AudioUploadPage.js
Original file line number Diff line number Diff line change
@@ -1,60 +1,16 @@
import React, {useContext, useState, useEffect} from 'react';
import React, {useContext} from 'react';
import { StatusBar } from 'expo-status-bar';
import { Audio } from 'expo-av';
import { useTheme } from '@react-navigation/native';

import {
InnerContainer,
PageTitle,
SubTitle,
StyledFormArea,
StyledButton,
ButtonText,
Line,
WelcomeContainer,
WelcomeImage,
Avatar,
StyledContainer,
ProfileHorizontalView,
ProfileHorizontalViewItem,
ProfIcons,
ProfInfoAreaImage,
ProfileBadgesView,
ProfileBadgeIcons,
ProfilePostsSelectionView,
ProfilePostsSelectionBtns,
ProfileGridPosts,
ProfileFeaturedPosts,
ProfileTopBtns,
TopButtonIcons,
PostTypeSelector,
PostHorizontalView,
PostIcons,
PostCollectionView,
PostMsgBox,
BackgroundDarkColor,
FlexRow,
LeftButton_AudioUploadScreen,
RightButton_AudioUploadScreen,
darkModeOn,
darkModeStyling,
lightModeStyling,
AudioUploadScreenUploadButtons,
HorizontalLineAcrossScreen,
RecordAudio_AudioUploadPage,
RecordButton_RecordScreen_AudioUploadPage,
RecordButtonChanger_RecordScreen_AudioUploadPage,
AudioWaveBox_RecordScreen_AudioUploadPage,
ViewHider
} from '../screenStylings/styling.js';

// async-storage
import AsyncStorage from '@react-native-async-storage/async-storage';

//credentials context
import { CredentialsContext } from './../../components/CredentialsContext';
import { ImageBackground, ScrollView, Image, TouchableOpacity, Text, View } from 'react-native';
import * as Haptics from 'expo-haptics';
import { Image, TouchableOpacity, Text, View } from 'react-native';
import { StatusBarHeightContext } from '../../components/StatusBarHeightContext.js';
import TopNavBar from '../../components/TopNavBar.js';

Expand Down
Loading

0 comments on commit 832d7bc

Please sign in to comment.