Skip to content

Commit

Permalink
Cleanup console.logs
Browse files Browse the repository at this point in the history
  • Loading branch information
EmiM committed Jul 20, 2023
1 parent d728878 commit 1d221aa
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ export class IpfsFileManagerService extends EventEmitter {
}

public async uploadFile(metadata: FileMetadata) {
this.logger(`(${metadata.cid}) uploadFile start - ${metadata.path}`)
let width: number | undefined
let height: number | undefined
if (!metadata.path) {
Expand Down Expand Up @@ -171,10 +170,8 @@ export class IpfsFileManagerService extends EventEmitter {

// Save copy to separate directory
const filePath = this.copyFile(metadata.path, filename)
this.logger(`(${metadata.cid}) uploadFile new path - ${filePath}`)
console.time(`Writing ${filename} to ipfs`)
const newCid = await this.ipfs.add(uploadedFileStreamIterable)
this.logger(`(${metadata.cid}) added to ipfs - ${filePath}`)

console.timeEnd(`Writing ${filename} to ipfs`)

Expand All @@ -188,7 +185,6 @@ export class IpfsFileManagerService extends EventEmitter {
height,
}

this.logger(`(${metadata.cid} -> ${newCid.cid.toString()}) emitting UPLOADED_FILE - ${filePath}`)
this.emit(StorageEvents.UPLOADED_FILE, fileMetadata)

const statusReady: DownloadStatus = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class BackendWorkManager(private val context: Context) {
} catch (e: InterruptedException) {
e.printStackTrace()
}
println("Is this change visible?!")

if(!running) {
if(enqueued) {
stop()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ object Const {
const val NODEJS_TRASH_DIR = "nodejs-project-trash"

// Websocket
const val WEBSOCKET_CONNECTION_DELAY: Long = 15000
const val WEBSOCKET_CONNECTION_DELAY: Long = 7000
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export const MessageSendButton: FC<MessageSendButtonProps> = ({ onPress, disable
<TouchableWithoutFeedback onPress={handlePress} testID={'send_message_button'}>
<View
style={{
// flex: 1.5,
paddingLeft: 5,
paddingRight: 5,
justifyContent: 'center',
Expand Down
2 changes: 2 additions & 0 deletions packages/mobile/src/tests/channel.navigation.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import { ChannelScreen } from '../screens/Channel/Channel.screen'
import { FactoryGirl } from 'factory-girl'
import { getFactory, communities, identity } from '@quiet/state-manager'

// Mocked because of: "Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNDocumentPicker'
// could not be found. Verify that a module by this name is registered in the native binary."
jest.mock('react-native-document-picker', () => {})

describe('Channel navigation', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,13 @@ export function* updateMessageMediaSaga(
)

const message = channelMessages[action.payload.message.id]
// console.log('allmessages:', channelMessages)
// console.log('message:', message)

if (!message || !instanceOfChannelMessage(message)) {
console.error(
`Cannot update message media. Message ${action.payload.message.id} from #${action.payload.message.channelId} does not exist in local storage.`
)
return
}

console.log(`(updateMessageMediaSaga) Updating message media ${action.payload.message.id}`)

yield* put(
messagesActions.incomingMessages({
messages: [
Expand Down

0 comments on commit 1d221aa

Please sign in to comment.